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.

21) 37. Which of the following statements is false

  • 1) Using typedef does not replace the standard C++ data type name with the new name
  • 2) The new name defined by typedef, can be used as a type for another typedef
  • 3) typedef defines new data types
  • 4) None of the above
View Answer View Explanation
Ans.   C
Explanation :

22) What is actual syntax of destructor in c+

  • 1) !Classname( )
  • 2) @Classname( )
  • 3) $Classname( )
  • 4) ~Classname( )
View Answer View Explanation
Ans.   D
Explanation :

23) A variable is defined within a block in a body of a function. Which of the following are tru

  • 1) It is visible from the point of definition to the end of the program.
  • 2) It is visible throughout the function.
  • 3) It is visible from the point of definition to the end of the block.
  • 4) It is visible throughout the block.
View Answer View Explanation
Ans.   B
Explanation :

24) Which of the following keywords are used to control access to a class membe

  • 1) protected
  • 2) switch
  • 3) goto
  • 4) for
View Answer View Explanation
Ans.   A
Explanation :

25) Which of the following cannot be passed to a function

  • 1) Array
  • 2) Reference variable
  • 3) Object
  • 4) File
View Answer View Explanation
Ans.   D
Explanation :

26) Among following which will give the size of object or typ

  • 1) Calloc
  • 2) Malloc
  • 3) Sizeof
  • 4) Realloc
View Answer View Explanation
Ans.   C
Explanation :

27) The major goal of inheritance in C++ is

  • 1) To facilitate the reusability of code
  • 2) To help modular programming
  • 3) To facilitate the conversion of data types
  • 4) To extend the capabilities of a class
View Answer View Explanation
Ans.   A
Explanation :

28) Size of a char i

  • 1) 1
  • 2) 2
  • 3) 3
  • 4) 4
View Answer View Explanation
Ans.   A
Explanation :

29) Enumerators are stored by the compiler i

  • 1) string
  • 2) integer
  • 3) float
  • 4) any of above
View Answer View Explanation
Ans.   B
Explanation :

30) Data members and member functions are enclosed withi

  • 1) union
  • 2) structure
  • 3) class
  • 4) array
View Answer View Explanation
Ans.   C
Explanation :
<< Previous Page Next Page >>

Get Free Current Affairs and Govt Jobs Alerts in your mailbox

Current Affairs
Govt Jobs

Visit Our Blog