Technical Interview Questions in Wipro

by Ajinkya Kulkarni | Updated on 13 April 2024
  1. What is Object-Oriented Programming (OOP) in C++?
  • Answer: Object-Oriented Programming (OOP) in C++ is a programming paradigm that focuses on creating objects that contain both data (attributes) and methods (functions) to operate on the data. It emphasizes concepts such as classes, objects, inheritance, polymorphism, and encapsulation.
  1. Explain the four pillars of Object-Oriented Programming in C++.

Answer: The four pillars of Object-Oriented Programming in C++ are:

  • Encapsulation: Combining data and functions into a single unit (class) and restricting access to the data from outside the class.
  • Inheritance: Allowing a class (derived class) to inherit properties and behaviors from another class (base class), facilitating code reuse and hierarchical relationships.
  • Polymorphism: The ability to process objects of different classes through a uniform interface, achieved through function overloading, overriding, and virtual functions.
  • Abstraction: Representing essential features of an object while hiding unnecessary details, enabling the creation of abstract data types.
  1. What is a class in C++?
  • Answer: In C++, a class is a blueprint for creating objects. It defines the structure and behavior of objects by encapsulating data (member variables) and operations (member functions). Objects are instances of classes, and they share the same structure but may have different data.
  1. What is an object in C++?
  • Answer: An object in C++ is an instance of a class. It represents a real-world entity or concept and encapsulates both data (attributes) and behavior (methods). Objects are created using the new keyword followed by the class constructor, and they can interact with each other by invoking member functions or accessing member variables.
  1. What is inheritance in C++?
  • Answer: Inheritance in C++ is a mechanism by which a class (derived class) can inherit properties and behaviors from another class (base class). It allows the reuse of existing code and establishes an "is-a" relationship between classes. Derived classes can access base class members (public and protected) and extend or override their functionality.
  1. What is method overriding in C++?
  • Answer: Method overriding in C++ refers to the ability of a derived class to provide a specific implementation of a function that is already defined in its base class. It allows a subclass to customize the behavior of inherited functions according to its own requirements. Method overriding is achieved by declaring a function with the same signature in both the base and derived classes.
  1. What is method overloading in C++?
  • Answer: Method overloading in C++ allows multiple functions with the same name but different parameters to coexist within the same scope. It enables the creation of functions that perform similar tasks but with different inputs. Method overloading is determined at compile time based on the number and types of arguments passed to the function.
  1. What is encapsulation in C++?
  • Answer: Encapsulation in C++ involves bundling data (attributes) and methods (functions) that operate on the data into a single unit (class). It hides the internal implementation details of a class from the outside world and provides controlled access to the data through member functions. Encapsulation enhances data security and promotes code maintainability.
  1. What is abstraction in C++?
  • Answer: Abstraction in C++ involves representing essential features of an object while hiding unnecessary details. It allows programmers to focus on the relevant aspects of an object without being concerned about its internal workings. Abstraction is achieved in C++ through classes, which define interfaces for interacting with objects while concealing their implementation details.
  1. What is polymorphism in C++?
  • Answer: Polymorphism in C++ refers to the ability of objects to take on multiple forms. It allows a single interface to be used for different types of objects, enabling code reuse and flexibility. Polymorphism can be achieved in C++ through function overloading, function overriding, and virtual functions, which enable dynamic binding and runtime polymorphism.
  1. What is Java?
  • Answer: Java is a high-level, object-oriented programming language developed by Sun Microsystems (now owned by Oracle Corporation). It is platform-independent, meaning that Java code can run on any device that has a Java Virtual Machine (JVM) installed.
  1. What are the main features of Java?
  • Answer: The main features of Java include:
  • Object-oriented: Java supports the concepts of classes and objects.
  • Platform-independent: Java programs can run on any platform that has a JVM.
  • Simple and easy to learn: Java syntax is similar to C++, making it easier for developers to transition.
  • Robust and secure: Java provides strong memory management and security features.
  • Multithreaded: Java supports concurrent programming through its built-in support for multithreading.
  1. What is the difference between JDK, JRE, and JVM?
  • Answer: JDK (Java Development Kit) is a software development kit that includes tools for developing Java applications. JRE (Java Runtime Environment) is a runtime environment that is required to run Java applications. JVM (Java Virtual Machine) is an abstract computing machine that provides the runtime environment in which Java bytecode can be executed.
  1. Explain the concept of inheritance in Java.
  • Answer: Inheritance is a mechanism in Java by which one class (subclass) can inherit the properties and behaviors of another class (superclass). It allows code reusability and establishes a relationship between classes. Subclasses can inherit fields, methods, and nested classes from their superclass.
  1. What is polymorphism in Java?
  • Answer: Polymorphism is a feature of object-oriented programming languages like Java that allows objects of different types to be treated as objects of a common superclass. It enables a single interface to be used to represent different types of objects and allows methods to be invoked based on the actual object type at runtime.
  1. What is the difference between abstract class and interface in Java?
  • Answer: An abstract class in Java is a class that cannot be instantiated and may contain abstract methods, concrete methods, and instance variables. An interface, on the other hand, is a reference type similar to a class but contains only abstract methods and constant fields. A class can implement multiple interfaces but can only inherit from one abstract class.
  1. What are the access modifiers in Java and what do they mean?
  • Answer: Java provides four access modifiers: public, protected, default (no modifier), and private. These modifiers control the visibility and accessibility of classes, methods, and variables. public members are accessible from any other class, protected members are accessible within the same package or by subclasses, default members are accessible only within the same package, and private members are accessible only within the same class.
  1. What is exception handling in Java?
  • Answer: Exception handling in Java is a mechanism to handle runtime errors (exceptions) that occur during the execution of a program. It involves catching and handling exceptions using try-catch blocks, throwing exceptions using the throw keyword, and defining exception classes that extend the Exception class.
  1. What is the difference between == and .equals() in Java?
  • Answer: In Java, == is used to compare the references of two objects, i.e., whether they refer to the same memory location. On the other hand, the .equals() method is used to compare the contents or values of two objects. It is often overridden in classes to provide custom comparison logic.
  1. What is the difference between ArrayList and LinkedList in Java?
  • Answer: Both ArrayList and LinkedList are implementations of the List interface in Java, but they differ in their underlying data structures. ArrayList is backed by a dynamic array, which provides fast random access but slower insertion and deletion of elements. LinkedList, on the other hand, is backed by a doubly linked list, which provides fast insertion and deletion but slower random access.
  1. What is the OSI reference model?
  • Answer: The OSI (Open Systems Interconnection) reference model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven distinct layers.
  1. Explain TCP/IP Model.
  • Answer: The TCP/IP (Transmission Control Protocol/Internet Protocol) model is a suite of communication protocols used to interconnect network devices on the internet. It consists of four layers: Application Layer, Transport Layer, Network Layer, and Network Interface Layer.
  1. What are the layers in OSI Reference Models? Describe each layer briefly.
  • Answer: The OSI model consists of seven layers:
  • Physical Layer: Deals with the physical connection between devices.
  • Data Link Layer: Handles the reliable transfer of data across physical links.
  • Network Layer: Manages logical addressing and routing of data packets.
  • Transport Layer: Provides end-to-end communication services.
  • Session Layer: Manages sessions and dialogues between devices.
  • Presentation Layer: Handles data translation, encryption, and compression.
  • Application Layer: Provides network services to applications.
  1. What is DNS?
  • Answer: DNS (Domain Name System) is like the internet's phone book. It translates domain names into IP addresses, allowing users to access websites using human-readable names rather than numerical IP addresses.
  1. What is a Firewall?
  • Answer: A firewall is a network security device or software that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between a trusted internal network and untrusted external networks.
  1. What is HTTP and what port does it use?
  • Answer: HTTP (Hypertext Transfer Protocol) is a protocol used for transmitting and receiving web content. It typically uses TCP port 80.
  1. What is HTTPS and what port does it use?
  • Answer: HTTPS (Hypertext Transfer Protocol Secure) is a secure version of HTTP that uses encryption to ensure secure communication over a computer network. It commonly uses TCP port 443.
  1. What are TCP and UDP?
  • Answer: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two common transport layer protocols used in networking. TCP provides reliable, connection-oriented communication, while UDP is connectionless and provides faster but less reliable communication.
  1. What is a Node in networking?
  • Answer: In networking, a node refers to any device connected to a network. This could include computers, printers, servers, routers, or any other network-enabled device.
  1. What is a Router and how does it differ from a Switch?
  • Answer: A router is a networking device that forwards data packets between computer networks. It operates at the network layer of the OSI model and makes routing decisions based on IP addresses. A switch, on the other hand, operates at the data link layer and forwards data frames within a single network.
  1. What is software re-engineering?
  • Answer: Software re-engineering is the process of restructuring and updating existing software systems to improve their maintainability, performance, or other quality attributes without changing their functionality.
  1. What is modularization?
  • Answer: Modularization is a software engineering technique used to divide a software system into smaller, more manageable modules or components. This helps improve maintainability, reusability, and scalability of the software.
  1. What is the difference between a computer program and computer software?
  • Answer: A computer program is a set of instructions written in a programming language to perform a specific task, while computer software refers to a collection of programs, documentation, and user guides that together provide functionality to the user.
  1. What is cohesion?
  • Answer: Cohesion is a measure of how closely related and focused the responsibilities of elements within a module or component are. High cohesion indicates that the elements within a module are strongly related and work together towards a common purpose.
  1. Explain the difference between strong-typing and weak-typing.
  • Answer: Strong typing refers to a programming language feature where the data types of variables are strictly enforced by the compiler or interpreter at compile time, while weak typing allows for more flexibility in variable typing and may perform implicit type conversions.
  1. What is quality assurance vs. quality control?
  • Answer: Quality assurance focuses on preventing defects by establishing processes and standards to ensure quality throughout the software development lifecycle, while quality control involves identifying and correcting defects through testing and inspection.
  1. When do you use polymorphism in programming?
  • Answer: Polymorphism is used in object-oriented programming when different classes share a common interface or supertype but have different implementations of methods. It allows for more flexible and extensible code by enabling objects of different types to be treated interchangeably.
  1. What is a stub and how does it differ from a mock?
  • Answer: A stub is a minimal implementation of an interface used in testing to simulate the behavior of a real object. It typically returns hardcoded data. A mock, on the other hand, is an object that simulates the behavior of a real object and is used to verify interactions between objects in a test.
  1. What is functional programming?
  • Answer: Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids changing state and mutable data. It emphasizes the use of pure functions and higher-order functions.
  1. How do you prioritize requirements in software development?
  • Answer: Requirements prioritization involves identifying and ranking software requirements based on their importance, value to stakeholders, feasibility, and dependencies. Techniques such as MoSCoW (Must have, Should have, Could have, Won't have) prioritization and pairwise comparison can be used to prioritize requirements effectively.
  1. What is computer software?
  • Answer: Computer software is a package that includes a software program, its documentation, and user guides on how to use the software.
  1. What is a Domain and how does it differ from a Workgroup?
  • Answer: In a Computer Network, different computers are organized in different methods and these methods are – Domains and Workgroups. Usually, computers which run on the home network belong to a Workgroup.
  1. What is verification and validation in software development?
  • Answer: Verification ensures that software conforms to its specification, while validation ensures that software meets the needs of its users and stakeholders.
  1. What are SDLC models available?
  • Answer: Waterfall Model, Spiral Model, Big-bang Model, Iterative Model, and V-Model are some of the famous SDLC models.
  1. What is the main difference between a stub and a mock?
  • Answer: A stub is a minimal implementation of an interface which generally returns hardcoded data, while a mock usually verifies outputs against expectations set in the test.
  1. What is project estimation in software development?
  • Answer: Project estimation is the process of estimating various aspects of the software product, which can be decided either by consulting experts or using predefined formulas.
  1. What is the purpose of a Session Layer in the OSI model?
  • Answer: The Session Layer in the OSI model manages and controls the connections between computers. It establishes, coordinates, exchanges, and terminates the connections between local and remote applications.
  1. What is encapsulation in object-oriented programming?
  • Answer: Encapsulation is the bundling of data (attributes) and methods (functions) that operate on the data into a single unit or class. It helps in data hiding and abstraction.
  1. What is an IP address and what are its types?
  • Answer: An IP address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. The two main types of IP addresses are IPv4 and IPv6.
  1. What is a network switch and how does it differ from a hub?
  • Answer: A network switch is a networking device that connects devices together on a computer network by using packet switching to forward data to the destination device. It operates at the data link layer of the OSI model. Unlike a hub, which broadcasts data to all devices connected to it, a switch forwards data only to the device for which it is intended, thus conserving network bandwidth and improving security.

 

FAQ

Any Questions?
Look Here.