C++ Programming Questions Answers - Set 2

C++ Programming Questions Answers - SET 2 includes basic and important questions on C++ Programming Language which are important for IBPS IT Officer Aptitude exam, Campus Placements and other technical interviews and exams.

11) int *ptr[

  • 1) a pointer of 5 int elements
  • 2) an array of 5 int pointers
  • 3) an array of 5 elements returning an int value
  • 4) none of above
View Answer View Explanation
Ans.   B
Explanation :

12) When a structure refers to itself, it is known a

  • 1) encapsulated structure
  • 2) nested structure
  • 3) recursive structure
  • 4) self-referential structure
View Answer View Explanation
Ans.   D
Explanation :

13) Destructors are called

  • 1) not defined
  • 2) in any order
  • 3) in the reverse order of constructor calls
  • 4) in the same order of constructor calls
View Answer View Explanation
Ans.   C
Explanation :

14) The members of a class are ? b) by default are private c) are made private by declaring as private d) none of the abov

  • 1) have no visibility by default
  • 2) public by default
  • 3) private by default
  • 4) protected by default
View Answer View Explanation
Ans.   C
Explanation :

15) The function used to define the task assigned to an operator i

  • 1) Virtual function
  • 2) Static function
  • 3) Operator function
  • 4) Friend function
View Answer View Explanation
Ans.   C
Explanation :

16) Which operators can not be overloade

  • 1) Binary operator
  • 2) Ternary operator
  • 3) Unary operator
  • 4) All can be overloaded
View Answer View Explanation
Ans.   B
Explanation :

17) Classes in c++ ar

  • 1) Fundamental data type
  • 2) Primitive data type
  • 3) Desired data type
  • 4) Not defined
View Answer View Explanation
Ans.   C
Explanation :

18) 66. A constructor function is generally define

  • 1) In the private section of a class
  • 2) In the public section of a class
  • 3) In the protected section of a class
  • 4) None of the above
View Answer View Explanation
Ans.   B
Explanation :

19) The symbol ** _

  • 1) can be overloaded by changing its datatype.
  • 2) cannot be overloaded, as on overloading its meaning shall be changed.
  • 3) can be overloaded.
  • 4) cannot be overloaded as it is not a C++ operator.
View Answer View Explanation
Ans.   D
Explanation :

20) Only one copy of the class is inherited, when it is defined a

  • 1) virtual
  • 2) public
  • 3) static
  • 4) private
View Answer View Explanation
Ans.   A
Explanation :
<< Previous Page Next Page >>

Get Free Current Affairs and Govt Jobs Alerts in your mailbox

Current Affairs
Govt Jobs

Visit Our Blog