You can test your C++ skills with Quiz. The Test. The test contains 25 questions and there is no time limit. The test is not official, C++ Interview Questions For Freshers · 1. What are the different data types present in C++? · C++ Interview Questions for Freshers . Commonly Asked C++ Interview Questions . and Top C++ Interview Questions and Answers that cover almost all the major basic and advanced coding topics in C++ questions on advanced topics . top interview questions and the tips in facing the interview.
1Q. Which of the following is a correct identifier in C++?
Option C – VAR_1234
2Q. Which of the following is called address operator?
Option B – &
3Q. What are the actual parameters in C++?
a) Parameters with which functions are called
b) Parameters which are used in the definition of a function
c) Variables other than passed parameters in a function
d) Variables that are never used in the function
Option A -Parameters with which functions are called
4Q. Which function is used to read a single character from the console in C++?
Option A -cin.get(ch)
5Q. Which function is used to write a single character to console in C++?
Option A -cout.put(ch)
6Q. Which of the following escape sequence represents carriage return?
Option A – \r
7Q. Who created C++?
a) Bjarne Stroustrup
b) Dennis Ritchie
c) Ken Thompson
d) Brian Kernighan
Option A -Bjarne Stroustrup
8Q. A language which has the capability to generate new data types are called ____
Option A -Extensible
9Q. Wrapping data and its related functionality into a single entity is known as _
Option B -Encapsulation
10Q. What does polymorphism in OOPs mean?
a) Concept of allowing overiding of functions
b) Concept of hiding data
c) Concept of keeping things in differnt modules/files
d) Concept of wrapping things into a single unit
Option A -Concept of allowing overiding of functions
11Q. Which concept allows you to reuse the written code?
Option C -Inheritance
12Q. How access specifiers in Class helps in Abstraction?
a) They does not helps in any way
b) They allows us to show only required things to outer world
c) They help in keeping things together
d) Abstraction concept is not used in classes
Option B -They allows us to show only required things to outer world
13Q. Which of the following class allows to declare only one object of it?
a) Abstract class
b) Virtual class
c) Singleton class
d) Friend class
Option C -Singleton class
14Q. Out of the following, which is not a member of the class?
a) Static function
b) Friend function
c) Constant function
d) Virtual function
Option B -Friend function
15Q. Which of the following cannot be a friend?
d) Operator function
Option C – Object
16Q. Why references are different from pointers?
a) A reference cannot be made null
b) A reference cannot be changed once initialized
c) No extra operator is needed for dereferencing of a reference
d) All of the mentioned
Option D – All of the mentioned
17Q. How many types of polymorphism are there in C++?
Option B – 2
18Q. How compile-time polymorphisms are implemented in C++?
a) Using Inheritance
b) Using Virtual functions
c) Using Templates
d) Using Inheritance and Virtual functions
Option C – Using Templates
19Q. Which of the following explains the overloading of functions?
a) Virtual polymorphism
b) Transient polymorphism
c) Ad-hoc polymorphism
d) Pseudo polymorphism
Option C – Ad-hoc polymorphism
20Q. Which of the following approach is used by C++?
Option B – Bottom-up
21Q. Which operator is overloaded for a cout object?
Option B – <<
22Q. Which of the following is correct?
a) C++ allows static type checking
b) C++ allows dynamic type checking.
c) C++ allows static member function to be of type const.
d) C++ allows both static and dynamic type checking
Option D – C++ allows both static and dynamic type checking
23Q. Which of the following is true?
I) All operators in C++ can be overloaded.
II) The basic meaning of an operator can be changed.
a) I only
b) II only
c) Both I and II
d) Neither I nor II
Option D – Neither I nor II
24Q. Which of the following is not a type of inheritance?
Option C – Distributive
25Q. Which members are inherited but are not accessible in any case?
d) Both private and protected
Option A – Private