About

Technical Interview Questions for Wipro


 

  1. Explain the concept of Object-Oriented Programming (OOP) and provide examples of its key principles.

    • Answer: Object-Oriented Programming (OOP) is a programming paradigm based on the concept of "objects," which can contain data in the form of fields and code in the form of procedures. OOP principles include encapsulation (data hiding), inheritance (reuse of code and extending functionalities), and polymorphism (ability to use objects of different classes interchangeably).
  2. What are the differences between procedural programming and object-oriented programming?
    • Answer: Procedural programming focuses on procedures or functions that operate on data, whereas object-oriented programming focuses on objects that encapsulate both data and functions. In procedural programming, data and procedures are separate, while in OOP, they are bundled together in objects.
  3. Describe the ACID properties in the context of database transactions.
    • Answer: ACID stands for Atomicity, Consistency, Isolation, and Durability. Atomicity ensures that all operations within a transaction are completed successfully or rolled back if any fail. Consistency ensures that the database remains in a consistent state before and after the transaction. Isolation ensures that concurrent transactions do not interfere with each other. Durability ensures that the changes made by committed transactions persist even in the event of system failure.
  4. Explain the difference between a primary key and a foreign key in a relational database.
    • Answer: A primary key is a unique identifier for each record in a table and ensures that each record is distinct. A foreign key, on the other hand, establishes a relationship between two tables by referencing the primary key of another table. It enforces referential integrity, ensuring that values in the foreign key column exist in the referenced primary key column.
  5. What is normalization in database design, and why is it important?
    • Answer: Normalization is the process of organizing data in a database to reduce redundancy and dependency. It involves dividing large tables into smaller, more manageable tables and defining relationships between them. Normalization helps in minimizing data duplication, improving data integrity, and optimizing database performance.
  6. What is the difference between TCP and UDP? When would you use each protocol?
    • Answer: TCP (Transmission Control Protocol) provides reliable, connection-oriented communication with error detection, acknowledgment, and data retransmission. UDP (User Datagram Protocol) provides fast, connectionless communication without guarantees of delivery or reliability. TCP is used for applications requiring reliable data transmission, such as web browsing and email. UDP is used for applications where speed and efficiency are more important than reliability, such as online gaming and streaming media.
  7. Explain the concept of process synchronization in operating systems. Give examples of synchronization primitives.
    • Answer: Process synchronization refers to the coordination of multiple processes or threads to ensure orderly access to shared resources and avoid race conditions. Synchronization primitives include locks, semaphores, monitors, and barriers. These primitives help in implementing critical sections, mutual exclusion, and coordination between processes or threads.
  8. What is virtual memory, and how does it work in modern operating systems?
    • Answer: Virtual memory is a memory management technique that allows the execution of programs larger than physical memory by utilizing disk space as an extension of RAM. Modern operating systems use a combination of physical memory (RAM) and virtual memory (disk space) to create an illusion of a larger memory space. The operating system manages the mapping of virtual addresses to physical addresses, swapping data between RAM and disk as needed.
  9. Describe the OSI model and the role of each layer in network communication.
    • Answer: The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a communication system into seven layers. These layers are:
      1. Physical Layer: Deals with the physical transmission of data over the network medium.
      2. Data Link Layer: Handles the framing, error detection, and flow control of data packets.
      3. Network Layer: Manages routing and logical addressing to enable end-to-end communication.
      4. Transport Layer: Provides reliable, end-to-end data transmission with error detection and recovery.
      5. Session Layer: Manages sessions between applications, including establishment, maintenance, and termination.
      6. Presentation Layer: Handles data formatting, encryption, and compression for compatibility between different systems.
      7. Application Layer: Provides network services to applications, such as file transfer, email, and web browsing.
  10. What is a deadlock in operating systems? How can it be prevented or resolved?
    • Answer: A deadlock occurs when two or more processes are unable to proceed because each is waiting for a resource held by the other. Deadlocks can be prevented by using techniques such as resource allocation graphs, deadlock detection, and prevention algorithms (like Banker's algorithm). Deadlocks can also be resolved by techniques such as process termination, resource preemption, and rollback.