Add office photos
Employer?
Claim Account for FREE

Outscal

4.7
based on 7 Reviews
Filter interviews by

DePronto Infotech Interview Questions and Answers

Updated 5 Feb 2024

Q1. What is Diamond Problem in C++ ? How to solve it ?

Ans.

Diamond Problem occurs in multiple inheritance when a class inherits from two classes that have a common base class.

  • Diamond Problem arises when a class inherits from two classes that have a common base class.

  • Ambiguity arises in accessing the common base class members.

  • To solve Diamond Problem, virtual inheritance is used to ensure only one copy of the common base class is inherited.

Add your answer

Q2. Contructors and its types. Types of Copy Constructor

Ans.

Constructors are special member functions in a class used to initialize objects. Copy constructors create a new object as a copy of an existing object.

  • Types of constructors: Default constructor, Parameterized constructor, Copy constructor, and Destructor

  • Types of copy constructors: Shallow copy constructor and Deep copy constructor

  • Shallow copy constructor copies the values of the members of one object to another object. Example: MyClass(const MyClass &obj) { x = obj.x; y = obj...read more

Add your answer

Q3. Virtual Functions and why is it needed ?

Ans.

Virtual functions in C++ allow for dynamic polymorphism by enabling a function to be overridden in a derived class.

  • Virtual functions are used in C++ to achieve runtime polymorphism, where the function to be called is determined at runtime based on the object's type.

  • They are needed to enable a base class pointer to call a function that is overridden in a derived class.

  • Virtual functions help in achieving the Open/Closed principle of object-oriented programming, allowing for ext...read more

Add your answer

Q4. What are Smart Pointers

Ans.

Smart pointers are objects that manage the memory of dynamically allocated objects in C++ to prevent memory leaks.

  • Smart pointers automatically delete the object they point to when they are no longer needed.

  • Examples include unique_ptr, shared_ptr, and weak_ptr in C++.

  • They help in preventing memory leaks and dangling pointers.

  • Smart pointers provide better memory management compared to raw pointers.

Add your answer
Discover DePronto Infotech interview dos and don'ts from real experiences

Q5. Middle of a linked list

Ans.

To find the middle of a linked list, use two pointers - one moving at double the speed of the other.

  • Initialize two pointers, slow and fast, both pointing to the head of the linked list.

  • Move the slow pointer by one node and the fast pointer by two nodes in each iteration.

  • When the fast pointer reaches the end of the list, the slow pointer will be at the middle node.

Add your answer

Q6. Travelling Salesman Problem

Ans.

The Travelling Salesman Problem is a classic optimization problem where a salesman needs to visit a set of cities exactly once and return to the starting city with the shortest possible route.

  • The goal is to find the shortest possible route that visits each city exactly once and returns to the starting city.

  • This problem is NP-hard, meaning there is no known efficient algorithm to solve it for large numbers of cities.

  • One common approach is to use heuristics like the nearest nei...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.5
 • 370 Interview Questions
3.9
 • 320 Interview Questions
3.9
 • 253 Interview Questions
3.6
 • 165 Interview Questions
3.5
 • 160 Interview Questions
3.9
 • 128 Interview Questions
View all
Top Outscal Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter