Important Questions on C++

Last Updated: Sep 13, 2013

Jan 13 • Resources • 143620 Views • 448 Comments on Important Questions on C++

Questions with Answers on C++ Programming Language
Following are the important questions on C++ with their answers which has been asked in the various exams and interviews. Let’s discuss them in detail.

Q1: What is C++?
Ans: C++ is a general purpose object oriented programming language invented in the early 1980 by bajarne stroutrup.

Q2: What is class?
Ans: A class can be declared as a collection of data members along with members function which allows association of data and functions into a single unit called encapsulation.

C++

C++ Language

Q3: What are the different features of c++?
Ans: Following are the different features of the Classes in C++,

  • Operators and function overloading
  • Free storage management
  • Constant types
  • References
  • Inline function
  • Virtual function
  • Templates
  • Exception handling

Q4: Explain constructor?
Ans: Constructors is a member function having the same name as that of its class and is executed automatically when the class is instantiated(object is created).

Q5: What is a function?
Ans: A function is a block of code which executes the statements when we call it.
It consists of three entities:
1) the function name.this is simply a unique identifier.
2) The function parameters.this is a set of zero or more typed identifier.
3) The function return type this specifies the type of value function returns.

Q6: Explain Inline function?
Ans: Inline function are those function whose function body is inserted in place of the function call.

Q7: What is function overloading?
Ans: function polymorphism for function overloading is a concept that allows multiple function to share the same name with different arguments type assigning one or more function function body to the same name is known as function overloading.

Q8: What is implicit and explicit type conversion?
Ans: In implicit casting in c++ compile automatically handle the type conversion.the final result expressed in the highest precision possible.

Explicit: the conversion of data type of two operands is not automatic but forced.we can force an expression to be a specific type by using a cast.

Q9: What is inheritance in C++ and name the different types of inheritance?
Ans: it is a technique of organizing information in a hierarchy form. It is like a child inheriting the features of its parent.
The class which we are inheriting from is called as the base class and the class which inherits called as derived class.

Different types of inheritance are as follows-:
1) single level
2) Multi-level
3) Multiple
4) Hierarchical(hybrid)
5) multipath

Q10: What is friend function?
Ans: A friend function is a function which is use to access the private data member of different class.

Download the C++ Questions and Answers in pdf QUESTIONS ON C++ with Answers.pdf

Give your views about this article in the comments below this article.

Related Links-
Important Question on C++
C++ Interview Questions and Answers with PDF

Tell us Your Queries, Suggestions and Feedback

Your email address will not be published. Required fields are marked *

448 Responses to Important Questions on C++

  1. Srishesha says:

    I want important questions in DSC++ from unit 1,2

  2. Srishesha says:

    I want important questions in DSC++ from unit 1,2

  3. Srishesha says:

    I want important questions in DSC++ from unit 1,2

  4. Srishesha says:
  5. Abhishek Manik Ashtikar says:

    i have problem in coding

  6. Abhishek Manik Ashtikar says:
  7. Aishwarya.R says:

    Answers for important questions in c++ for every chapters

  8. Sowmiya says:
  9. Sowmiya says:
  10. Madhu says:

    C++ questions

  11. Madhu says:

    C++ questions

  12. cs says:
  13. Anukul Baishya says:

    Tdc 1st sem

  14. Lalam Chandra Mouli says:

    C++ learning

  15. Andarg says:

    If you have any multiple choice questions about C++ sent me.

  16. sifiso says:

    C++/define class cash register in c++ with the follow description: private members: cashOnHand of type integer public member s a default constructor cash register ()set the cash in the register to500.a constructor cash register(into set the cash in the register to a specific amount. A fun action getCurrentBalance())which returns value of cashOnHand. ,
    A function accept amount(into) to receive the amount deposited by the customer and update the amount in the register

  17. kohila. P says:

    c++ program materail with previous question for bharathdhasan university

  18. hamza says:

    Hie, my name is hamza khan and i am from New Delhi.. My query is about programming in ++. I am doing bca from ignou. But still I have a back in c++ so please suggest how can I clear the exam please give me ans favour me some notes and easy way to clear this exam.

  19. balalakshmi says:

    What are all the important questions in microprocessor and tell me how I m studying it in easy way?

  20. Manish Kr Vats says:

    i am studing in btech 2nd year and what must i do or practise more so that i can get a good job like job in any top companies like google or microsoft.
    thaks

  21. deneke says:

    first year computer scince student at jimma university

  22. Abhishek says:

    What are the main questions in c++ from the exam point of view

  23. Jaspreet kaur says:

    write a friend function for adding the two different subject marks and display the sum using two classes

  24. sivaji says:

    mechatronis question banks and previous year questions

  25. vincent says:

    Enter your any educational query or doubt umu campus

« »