Q. What is the difference between an array and a linked list?
asked 5xeasyData structuresTechnical2018-2024
Ans. An array stores elements in contiguous memory and supports fast index access, while a linked list stores elements as nodes connected by pointers and is efficient for insertions or deletions when the position is known. Arrays are usually better for searching by index and cache performance. Linked lists use extra memory for pointers.
Q. What are semaphores and how are they used for process synchronization?
asked 3xmediumOperating systemsTechnical2016-2017
Ans. Semaphores are synchronisation primitives that control access to shared resources using an integer counter. Processes call wait to decrement the counter and may block if it is unavailable, then call signal to increment it and wake another process. Binary semaphores act like locks, while counting semaphores allow limited concurrent access.
Q. Explain storage classes in C.
asked 3xeasyOOPTechnical2018-2024
Ans. Storage classes in C++ define an object’s lifetime, visibility, and linkage. The main specifiers are static, extern, thread_local, and mutable. Historically, auto and register were also storage class specifiers, but auto now means type deduction and register is obsolete. The key idea is how long data exists and where it can be accessed.
Q. Solve problems based on clocks and calendars.
asked 3xeasyLogical reasoningOnline test2018-2024
Ans. Use standard facts: hour hand moves 0.5 degrees per minute, minute hand 6 degrees per minute, so relative speed is 5.5 degrees per minute. For calendars, remember ordinary years shift by 1 day and leap years by 2 days. Count odd days, adjust for leap years, then take remainder modulo 7.
Q. Find the correct synonym or antonym for a given word
asked 3xeasyVerbalOnline test2018-2024
Ans. Identify whether the question asks for a synonym or an antonym first. Read the word in context if a sentence is given, because meaning can change. Eliminate options that clearly do not fit. Compare the remaining choices by strength and tone. For antonyms, choose the direct opposite, not just a different meaning.
Q. What is the difference between a structure and a union?
asked 3xeasyOOPTechnical2018-2024
Ans. A structure stores each member in separate memory, while a union stores all members in the same memory location. In a structure, all fields can hold valid values at the same time. In a union, only one member is meaningfully valid at a time, and its size is the size of its largest member.
Q. What is the difference between arrays and linked lists?
asked 3xeasyData structuresTechnical2019-2024
Ans. Arrays store elements in contiguous memory and support fast index access, while linked lists store separate nodes connected by pointers and must be traversed. The key trade-off is that arrays give constant-time random access but costly middle insertions, while linked lists allow easier insertions or deletions once the position is found.
Q. Explain memory management techniques used in operating systems.
asked 2xmediumOperating systemsTechnical2016-2017
Ans. Operating systems manage memory using allocation, paging, segmentation, virtual memory, swapping, and protection. The key idea is to give each process a safe virtual address space, then map it to physical memory using page tables. Paging reduces fragmentation, swapping extends usable memory, and protection prevents processes corrupting each other.
Q. What is a deadlock in an operating system and how can it be prevented or avoided?
asked 2xmediumOperating systemsTechnical2017
Ans. A deadlock is a state where two or more processes are permanently blocked because each is waiting for a resource held by another. It can be prevented by breaking one necessary condition, such as allowing resource preemption or enforcing a fixed lock order. It can be avoided using safe allocation checks like Banker’s algorithm.
Q. What is a primary key in DBMS?
asked 2xeasyDBMSTechnical2019
Ans. A primary key is a column, or set of columns, that uniquely identifies each row in a database table. Its values must be unique and not null. A table can have only one primary key, and it is commonly used to create relationships with foreign keys in other tables.
Q. What is Internet of Things (IoT)?
asked 2xeasyNetworkingTechnical2017
Ans. The Internet of Things is a network of physical devices that contain sensors, software and connectivity so they can collect, send and sometimes act on data. The key idea is that everyday objects, such as thermostats, cars or factory machines, can communicate with systems or each other over the internet.
Q. What is a unique constraint in DBMS?
asked 2xeasyDBMSTechnical2019
Ans. A unique constraint is a rule that ensures all values in a column, or combination of columns, are distinct across rows in a table. It prevents duplicate data for fields such as email or username. Unlike a primary key, a table can have multiple unique constraints, and NULL handling depends on the DBMS.
Q. What is mapping cardinality in DBMS?
asked 2xeasyDBMSTechnical2019
Ans. Mapping cardinality in DBMS defines how many entities of one entity set can be associated with entities of another entity set in a relationship. The main types are one-to-one, one-to-many, many-to-one, and many-to-many, and they guide relationship design, keys, and constraints in a database schema.
Q. Does Java support multiple inheritance?
asked 2xeasyOOPTechnical2021-2022
Ans. Java does not support multiple inheritance of classes. A class can extend only one superclass, which avoids ambiguity such as the diamond problem. However, Java supports multiple inheritance of type through interfaces, so a class can implement many interfaces. Since Java 8, interfaces can have default methods, with explicit rules for resolving conflicts.
Q. Solve problems on time, speed, and distance
asked 2xeasyQuantitativeOnline test2018-2024
Ans. Use the basic relation distance equals speed multiplied by time. Convert all units first, such as minutes to hours or metres to kilometres. Rearrange the formula as needed: speed equals distance divided by time, and time equals distance divided by speed. For relative motion, add speeds when moving towards each other and subtract when moving in the same direction.
Q. Check whether a given number is a prime number
asked 2xeasyMathOnline test, Technical2016-2019
Ans. A number is prime if it is greater than 1 and has no divisors other than 1 and itself. Handle n less than or equal to 1 as not prime, then test divisibility only up to the square root of n. This uses constant space and runs in O(sqrt n) time.
Q. How do you implement one-to-one mapping in DBMS?
asked 2xeasyDBMSTechnical2019
Ans. Implement a one-to-one mapping by putting a foreign key in one table that references the primary key of the other table, and add a unique constraint on that foreign key. This ensures each row can relate to at most one row. If both entities must always exist together, use a shared primary key.
Q. What are the different types of data structures?
asked 2xeasyData structuresTechnical2021-2024
Ans. Data structures are commonly classified as primitive and non-primitive, with non-primitive structures further divided into linear and non-linear types. Primitive types include integers, characters, booleans and floats. Linear structures include arrays, linked lists, stacks and queues. Non-linear structures include trees, graphs, heaps and hash tables. Some are also static or dynamic.
Q. Explain the different types of operating systems.
asked 2xeasyOperating systemsTechnical2019-2021
Ans. Operating systems are commonly classified as batch, time-sharing, distributed, network, real-time, multiprocessing, single-user, multi-user and embedded systems. The key difference is how they manage resources and users: some optimise throughput, some responsiveness, some strict timing, and others coordinate multiple machines or processors while hiding hardware complexity from applications.
Q. What is inheritance in object-oriented programming?
asked 2xeasyOOPTechnical2021-2024
Ans. Inheritance is an object-oriented programming feature where one class derives from another class and reuses or extends its fields and methods. The derived class, often called a subclass, can add new behaviour or override existing behaviour, while the base class defines shared functionality. It supports code reuse and represents “is a” relationships.
Q. What is the difference between for loop and while loop?
asked 2xeasyOOPTechnical2021
Ans. A for loop is usually used when the number of iterations is known, while a while loop is used when repetition depends on a condition becoming false. In a for loop, initialisation, condition, and update are usually written together. In a while loop, these are handled separately, so it is common for indefinite loops.
Q. What is the difference between structure and union in C?
asked 2xeasyOOPTechnical2019-2022
Ans. A structure stores each member in separate memory, while a union stores all members in the same memory location. This means a structure can hold values for all its fields at once, but a union can hold only one meaningful value at a time. A union’s size is usually that of its largest member.
Q. Check whether a given expression has balanced parentheses.
asked 2xeasyStacksOnline test2018-2024
Ans. Use a stack to scan the expression from left to right and verify that every closing bracket matches the most recent unmatched opening bracket. Push opening brackets, pop and compare on closing brackets, and ignore other characters. The expression is balanced only if no mismatch occurs and the stack is empty at the end. This runs in O(n) time.
Q. Answer questions based on a given reading comprehension passage
asked 2xeasyVerbalOnline test2024
Ans. Read the questions first to know what to look for, then read the passage carefully. Identify key facts, opinions, dates, names, and cause-effect links. For each answer, return to the relevant line rather than relying on memory. Eliminate options that contradict the passage, add outside knowledge, or are too broad.
Q. Explain the core Object-Oriented Programming (OOP) concepts in Java.
asked 2xeasyOOPOnline test, Technical2024
Ans. Java OOP is based on classes and objects, with encapsulation, inheritance, polymorphism and abstraction as the core concepts. Encapsulation hides data behind methods, inheritance reuses and extends behaviour, polymorphism lets the same interface call different implementations, and abstraction exposes essential behaviour while hiding implementation details, mainly through abstract classes and interfaces.
Q. Write an SQL query to find the maximum salary from the EMPLOYEE table.
asked 2xeasySQLTechnical2022-2024
Ans. Use the SQL aggregate function MAX on the salary column from the employee table. In words, the query selects the maximum value of salary across all employee rows. MAX ignores NULL salaries, and the database usually scans the salary values, so the time complexity is O(n) unless an index can be used.
Q. Explain the difference between method overloading and method overriding with examples.
asked 2xeasyOOPTechnical2021-2022
Ans. Method overloading means defining methods with the same name but different parameter lists in the same class, while overriding means a subclass provides its own implementation of a method already defined in its parent class. For example, print(int) and print(String) are overloaded. A Dog class overriding an Animal speak() method is overriding.
Q. Write a program in C or Java to count the number of words in a sentence and print the second word and the second last word.
asked 2xeasyStringsTechnical2019
Ans. Scan the sentence, split it into words using whitespace as the delimiter, count the resulting words, then print words[1] and words[count - 2]. Store the words in an array or list. If there are fewer than two words, report that the required words do not exist. Time complexity is O(n).
Q. Compare MSTP and RSTP
asked 1xmediumNetworkingTechnical2019
Ans. RSTP provides one rapid spanning tree for the whole switched network, while MSTP runs multiple spanning tree instances and maps VLANs to them. RSTP is simpler and converges quickly after topology changes. MSTP also converges quickly, but its main benefit is better VLAN-based load sharing and more efficient link use.
Q. How does Java bytecode work?
asked 1xmediumOOPTechnical2022
Ans. Java bytecode is the intermediate instruction set produced when Java source code is compiled, and it is executed by the Java Virtual Machine. The key point is portability: the same bytecode can run on any platform with a compatible JVM, which may interpret it or compile it just in time to native machine code.
Q. Explain file handling in Java.
asked 1xmediumOOPTechnical2024
Ans. Use try-with-resources with BufferedReader to read and BufferedWriter or Files.write to write, so streams close automatically. Read each line into a String or process it immediately; use a List<String> only if all lines must be stored. Time complexity is O(n), where n is file size.
Q. Traverse a matrix efficiently.
asked 1xmediumArraysTechnical2024
Ans. Traverse a matrix with two nested loops, visiting each cell once, usually row by row from top left to bottom right. For an m by n matrix, this takes O(mn) time and O(1) extra space. Row-wise traversal is typically cache-friendly in languages where rows are stored contiguously.
Q. Detect a loop in a linked list.
asked 1xmediumLinked listsTechnical2020
Ans. Use Floyd’s cycle detection with two pointers, slow and fast, starting at the head. Move slow one node at a time and fast two nodes at a time. If they ever meet, there is a loop. If fast reaches null, there is no loop. This runs in O(n) time and O(1) space.
Q. What is a JIT compiler in Java?
asked 1xmediumOOPTechnical2022
Ans. A JIT compiler in Java is the Just-In-Time compiler that converts frequently executed bytecode into native machine code while the program is running. The key benefit is performance: the JVM can interpret code first, then optimise hot methods using runtime information such as actual call paths and object usage.
Q. Explain ACID properties in DBMS.
asked 1xmediumDBMSTechnical2023
Ans. ACID properties are the guarantees that make database transactions reliable: Atomicity, Consistency, Isolation and Durability. Atomicity means all or nothing, Consistency keeps valid rules, Isolation prevents concurrent transactions interfering, and Durability ensures committed changes survive crashes. They are essential for correctness in systems handling critical data.
Q. Compare merge sort and quick sort.
asked 1xmediumSortingTechnical2020
Ans. Merge sort guarantees O(n log n) time and is stable, while quick sort is usually faster in practice but has O(n²) worst-case time. Merge sort needs extra memory for merging, typically O(n). Quick sort sorts mostly in place, using O(log n) stack space on average with good pivot selection.
Q. Explain blockchain in layman terms
asked 1xmediumBlockchainTechnical2021
Ans. A blockchain is a shared digital record book where transactions are grouped into blocks and linked in order. Many computers keep copies of it, so changing old records is very hard because everyone would notice. The key idea is trust without one central owner, using cryptography and agreement between participants.
Q. Explain dynamic memory allocation.
asked 1xmediumOperating systemsTechnical2023
Ans. Dynamic memory allocation is allocating memory while a program is running, rather than fixing its size at compile time. It is usually taken from the heap and used for data whose size or lifetime is not known in advance. The key detail is that this memory must be released or managed properly to avoid leaks.
Q. Implement the Quick Sort algorithm
asked 1xmediumSortingTechnical2023
Ans. Quick Sort is a divide and conquer sorting algorithm that chooses a pivot, partitions the array so smaller elements go before it and larger elements after it, then recursively sorts both sides. Its key detail is pivot choice: average time is O(n log n), but poor pivots can make it O(n²).
Q. Explain paging in operating systems.
asked 1xmediumOperating systemsTechnical2024
Ans. Paging is a memory management technique where a process’s virtual address space is split into fixed-size pages, and physical memory is split into same-size frames. The OS maps pages to frames using a page table, allowing non-contiguous allocation. The key benefit is avoiding external fragmentation while supporting virtual memory.
Q. What is the Singleton design pattern?
asked 1xmediumOOPTechnical2017
Ans. The Singleton pattern ensures a class has exactly one instance and provides a global access point to it. It is usually implemented with a private constructor and a static method or property returning the instance. The key detail is thread safety, especially if the instance is created lazily in a multi-threaded program.
Q. How can abstraction be achieved in Java?
asked 1xmediumOOPTechnical2021
Ans. Abstraction in Java is achieved using abstract classes and interfaces. They expose what an object can do while hiding how it does it. An abstract class can contain both abstract and concrete methods, while an interface mainly defines a contract that implementing classes must follow. This supports loose coupling and polymorphism.
Q. How do you release unused memory in C++?
asked 1xmediumOOPTechnical2021
Ans. Release unused memory in C++ by destroying the object that owns it, preferably through RAII using automatic objects, standard containers, or smart pointers. If you allocated with new, use delete, and if you allocated with new[], use delete[]. Memory from malloc must be released with free, not delete.
Q. Explain merge sort and its implementation
asked 1xmediumSortingTechnical2017
Ans. Merge sort is a divide and conquer sorting algorithm that splits an array into halves, recursively sorts each half, then merges the sorted halves. Implementation usually uses a helper merge step with temporary arrays or buffers to compare elements in order. It runs in O(n log n) time and usually needs O(n) extra space.
Q. What are semaphores and where are they used?
asked 1xmediumOperating systemsTechnical2021
Ans. Semaphores are synchronisation primitives used to control access to shared resources by maintaining a counter. A thread can wait to decrement the counter and proceed only when a resource is available, then signal to increment it. They are used in operating systems and concurrent programs for mutual exclusion, resource pools, and producer-consumer coordination.
Q. Explain servlets and their lifecycle in Java.
asked 1xmediumJavaOnline test2017
Ans. A servlet is a Java server-side component that handles web requests and generates responses, usually HTTP. Its lifecycle is managed by the servlet container: it loads the class, creates one instance, calls init once, calls service for each request, and finally calls destroy before removal. Shared instance state must be thread-safe.
Q. Explain the basics of multithreading in Java.
asked 1xmediumOperating systemsTechnical2019
Ans. Multithreading in Java means running multiple threads within one process so tasks can execute concurrently. A thread can be created using Thread, Runnable, or preferably managed through ExecutorService. The key issue is safe access to shared data, using synchronised blocks, locks, volatile variables, or concurrent collections to avoid race conditions.
Q. Name and explain the layers of the OSI model.
asked 1xmediumNetworkingTechnical2021
Ans. The OSI model has seven layers: Physical sends raw bits, Data Link frames data on a local network, Network routes packets, Transport provides end-to-end delivery, Session manages conversations, Presentation handles format and encryption, and Application supports user-facing protocols. The key idea is that each layer serves the one above and hides lower-level details.
Q. Answer verbal ability questions (20 questions)
asked 1xmediumVerbalOnline test2017
Ans. Read the instructions first, then answer in passes. Solve easy vocabulary, grammar and sentence order questions quickly, marking doubtful ones. For comprehension, read the questions before the passage and scan for evidence. Eliminate clearly wrong options, check tone and context, and avoid assumptions not supported by the text. Keep strict time control.
Q. How does blockchain solve real-world problems?
asked 1xmediumBlockchainTechnical2021
Ans. Blockchain solves real-world problems by creating a shared, tamper-resistant record between parties that do not fully trust each other. The key value is reducing reliance on a central intermediary. This helps in areas like cross-border payments, supply chain tracking, digital identity, asset ownership, and smart contracts, where auditability and trust matter.
Q. Create a simple multithreaded Java application.
asked 1xmediumOOPTechnical2024
Ans. Create a fixed thread pool with ExecutorService, submit several Runnable tasks, then shut the pool down after submission. Each task can process one item from a shared thread-safe queue, such as ConcurrentLinkedQueue or BlockingQueue. The key detail is avoiding unsafe shared state. Processing n independent items is linear time overall, with work split across threads.
Q. Explain Bayes theorem with a real-time example.
asked 1xmediumProbabilityHR2020
Ans. Bayes theorem calculates the probability of an event based on prior knowledge and new evidence. It is written as P(A|B) = P(B|A)P(A) / P(B). For example, in medical testing, it estimates the chance a patient really has a disease after a positive test, using disease frequency and test accuracy.
Q. How can we combine and use C and DBMS together?
asked 1xmediumDBMSTechnical2021
Ans. We combine C and a DBMS by using a database API or embedded SQL, so the C program connects to the database, sends SQL commands, and processes results. Common options include ODBC, MySQL C API, PostgreSQL libpq, or embedded SQL precompiled into normal C code.
Q. How is the size of a structure calculated in C?
asked 1xmediumOOPTechnical2018
Ans. The size of a structure in C is the sum of its members plus any padding added for alignment. The compiler may insert padding between fields and at the end so each member is correctly aligned in memory. Field order can change the final size, so use sizeof to get the actual value.
Q. What is the usage of the volatile keyword in C?
asked 1xmediumOOPTechnical2019
Ans. The volatile keyword tells the C compiler that a variable’s value may change unexpectedly, so every access must be read from or written to memory as written. It is used for memory-mapped hardware registers, variables changed by interrupt handlers, or signal handlers. It does not make operations atomic or thread-safe.
Q. What qualities make a good leader and how can someone become one?
asked 1xmediumLeadershipTechnical2021
Ans. A strong answer should define leadership through behaviours: clear direction, integrity, empathy, accountability, and helping others succeed. Pick a situation where you influenced people without relying only on authority. Emphasise listening, decision-making, handling pressure, and learning from feedback. Interviewers listen for self-awareness, consistency, and evidence that your leadership improves team results.
Q. How will you work under pressure when you have a lot of dependencies?
asked 1xmediumStress managementHR2017
Ans. Pick a real situation where delivery depended on other teams, vendors, or approvals. Emphasise how you mapped dependencies, clarified owners, set priorities, communicated early, and escalated risks calmly. Interviewers listen for structure under pressure, not heroics: clear judgement, transparency, teamwork, and evidence that you protected quality while meeting deadlines.
Q. What strategies would you use to attract more talent for open positions?
asked 1xmediumTalent attractionManagerial2023
Ans. A strong answer should describe a real hiring challenge where you widened the pipeline and improved quality. Emphasise data-driven sourcing, clear role messaging, employer brand, referrals, diverse channels, and candidate experience. Interviewers listen for practical tactics, awareness of market conditions, inclusion, partnership with hiring managers, and measurable outcomes such as applications, conversion, or time to hire.
Q. Design a scalable and efficient system to handle a large number of user requests
asked 1xmediumScalabilityTechnical2024
Ans. Use a load balancer in front of stateless application servers, scale them horizontally, cache frequent reads, and move slow work to queues and background workers. Store data in replicated databases, adding partitioning when needed. The key detail is removing shared state from request handlers so capacity can grow by adding instances.
Q. Design a system for tracking customer orders and explain the data structures you would use and how you would ensure scalability.
asked 1xmediumBasic system designTechnical2024
Ans. I would use an order service backed by a relational database for order state, with indexes on customer ID, order ID and status. Orders are immutable event records plus a current status row. For scale, partition by customer or order ID, cache common reads, publish changes through a queue, and use replicas for read traffic.
Showing 60 of 491 questions. Ranked by how often the same question came back across interviews.