Cpp Developer

Cpp Developer Interview Questions and Answers

Updated 29 Jul 2024

Popular Companies

Q1. implement virtual and friend function

Ans.

Virtual functions allow dynamic binding while friend functions can access private members of a class.

  • Virtual functions are declared in base class and overridden in derived class for dynamic binding.

  • Friend functions are declared outside the class but can access private members of the class.

  • Example of virtual function: virtual void display() = 0; // pure virtual function

  • Example of friend function: friend void displayDetails(); // declaration inside class, definition outside

Q2. Oops concept in brief

Ans.

Oops concept is a programming paradigm based on the principles of object-oriented programming.

  • Encapsulation: bundling data and methods that operate on the data into a single unit (class)

  • Inheritance: ability of a class to inherit properties and behavior from another class

  • Polymorphism: ability to present the same interface for different data types

  • Abstraction: hiding the complex implementation details and showing only the necessary features

Q3. Write a linked list reverse

Ans.

Reversing a linked list involves changing the direction of pointers to go from the end to the beginning.

  • Start by initializing three pointers: current, prev, and next.

  • Iterate through the list, updating pointers to reverse the links.

  • Update the head pointer to point to the new beginning of the list.

Cpp Developer Jobs

C / C++ Developer / CPP Developer 3-8 years
Resources Valley
5.0
Hyderabad / Secunderabad
Cpp Developer 1-3 years
Intellivision Technologies Pvt Ltd
4.2
Pune
Are these interview questions helpful?
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.9
 • 7.8k Interviews
3.8
 • 53 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Cpp Developer Interview Questions
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
65 L+

Reviews

4 L+

Interviews

4 Cr+

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