Important Questions on C++

Last Updated: Sep 13, 2013

Jan 13 • Resources • 143621 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. suresh says:

    Enter your any educational query or doubtful degree

  2. balwinder kaur says:

    please guided to me in summer training of computer engineering (diploma).

  3. Pranit Mogal says:

    Write a C++ program to find area and volume of cylinder using Inline function

  4. Mohammed Ilyas.B says:

    i need a guide for these languages (c,c++,java,html,php) easy understanding with key notes

  5. Mbabazi Vicent says:

    Would wish to know more about C++ programming language

  6. Suraj V. Doke says:

    I want guess papers of Second Year BBA(CA) 2017 for fourth semister

  7. Neville says:

    I want C++ question papers for the years 2014-15, 2015-16 for 9th grade pls create a website and upload the question papers and please send it to this email specified above. Many students in the Nilgiris are in need of these question papers

  8. Pascoal says:

    Hello Sir/Madam I would like help on void functions as I’m failing to call variables using void functions

  9. Ananna says:

    Write a program that reads 3 integer numbers a,b and c from user and computes minimum,median and maximum of the numbers.

  10. Aakash Gusain says:

    Which data members are accessible by member function of derived class?

  11. anoop tripathy says:

    does MCA will be the better option for a good future

  12. Surya says:

    How to download the important questions in c++ with answers?

  13. Pravina balmiki says:

    very much confusing in c++ practical and theory part

  14. khem bist says:

    i am a student of a class 12. I want to need a simple example of c ++

  15. Bani Singh says:

    I am pursing bca 3th sem in ch. harchand singh group of college khurja. I am do’t know Full english.then, i do. I am not understanding.and Exam came in date 19/2/16

  16. Gyanendra Pandey says:

    I have problem in C++ with Friend Function.
    If i declares display function as a friend function then there is no problem in programming while if i declare get function for friend function and display function as member function then how can i solve the problem in programming.

  17. Gift says:

    what is the simplest way of implementing virtual methords in c++

  18. Sounak Ghosh says:

    C++ is a very essential computer language which was developed by Bjarne Stroustrup.It is an object oriented programming language.The given article is very essential for those who are preparing for interviews as well as for their semester exams.

  19. Kishlay Verma says:

    C++ is an object-oriented programming language. For any technical interview concept of OOP is very much important. Go through the above questions,they will enrich your understanding in this subject.

  20. Jishnu Sen says:

    Oh fantastic. Very interesting and worthy subject to bring upfront.

  21. aratrika sengupta says:

    Though just these questions do not satisfy the needs for facing an interview based on C but it will be quite ensuring if someone is searching for the basic grip on C.

  22. Roshan Patil says:

    The above question and answer are not sufficient for interviwe on c++. This question are so basic.if u add more question on exception handling,polymerphism,template ,virtual function,operator overloading n referance. N most helpful is realtime example on it topics.
    n also thanks to puju for making such good bolg.

  23. Arpita Sardar says:

    The above Questions answers are really helpful to know about C++. So evry1 sholud go through it specially who r interested in IT field.

  24. Shaheen Khan says:

    Questions of C++ is present here. In This topic include 10 basics ques. of C++ which clear the meaning of C++ and tell differences with other lang

  25. Susmita Guha says:

    Came up with a different term free storage management. Would like to know more about it..

« »