Mirafra Technologies
Virtusa Consulting Services Interview Questions and Answers
Q1. what is data structures and types with examples of all types
Data structures are ways of organizing and storing data in a computer so that it can be accessed and used efficiently.
Types of data structures include arrays, linked lists, stacks, queues, trees, graphs, and hash tables.
Arrays are a collection of elements stored in contiguous memory locations, accessed using an index.
Linked lists are a series of nodes where each node contains data and a reference to the next node.
Stacks follow the Last In First Out (LIFO) principle, where ele...read more
Q2. what is oops concept example with each one
Object-oriented programming concepts include encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: bundling data and methods that operate on the data into a single unit (class). Example: class Car with properties like make, model, and methods like start(), stop().
Inheritance: creating new classes based on existing classes, inheriting their attributes and methods. Example: class SUV inheriting from class Car.
Polymorphism: ability of objects to take on multip...read more
Q3. what is class and objects with example and code
A class is a blueprint for creating objects in object-oriented programming. Objects are instances of classes.
A class defines the properties and behaviors of objects. For example, a 'Car' class may have properties like 'color' and 'model', and behaviors like 'drive' and 'stop'.
An object is an instance of a class. For example, 'myCar' can be an object of the 'Car' class with specific values for 'color' and 'model'.
Code example in Python: class Car: def __init__(self, color, mod...read more
Q4. what is virutal function and staic functions
Virtual functions are functions in a base class that are overridden in derived classes, while static functions belong to the class itself rather than instances.
Virtual functions allow for dynamic binding and polymorphism in object-oriented programming.
Static functions are associated with the class itself and can be called without creating an instance of the class.
Example: virtual void display() = 0; // pure virtual function in C++
Example: static void printMessage() { cout << ...read more
Q5. What is Polymorphism
Polymorphism is the ability of a function or method to behave differently based on the object it is acting upon.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
It enables a single interface to represent multiple data types.
Examples include method overloading and method overriding in object-oriented programming.
Q6. Reverse a string
Reverse a given string
Use a loop to iterate through the characters of the string
Append each character to a new string in reverse order
Return the reversed string
Interview Process at Virtusa Consulting Services
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month