Go to IBPS EXPERT

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.

1) The private data members of a class are accessible

  • 1) Directly to objects of that class
  • 2) To any function defined outside a class
  • 3) Only to the member functions
  • 4) Only using keyword static
View Answer View Explanation
Ans.   C
Explanation :

2) In C++ Functions can returns

  • 1) arrays
  • 2) reference
  • 3) objects
  • 4) all of above
View Answer View Explanation
Ans.   D
Explanation :

3) Which among following is not a valid visibility mode in c++ program

  • 1) Private
  • 2) Public
  • 3) Protected
  • 4) Limited
View Answer View Explanation
Ans.   D
Explanation :

4) How we can define member function outside the clas

  • 1) Using union
  • 2) Using structure
  • 3) Using pointers
  • 4) Using scope resolution
View Answer View Explanation
Ans.   D
Explanation :

5) Which among following is correct way of declaring object of a clas

  • 1) Classname Objectname;
  • 2) Class Classname Objectname;
  • 3) Class Classname Object Objectname;
  • 4) Classname Object Objectname;
View Answer View Explanation
Ans.   A
Explanation :

6) How we can access data members using object

  • 1) object@datamember
  • 2) object*datamember
  • 3) object->datamember
  • 4) object.datamember
View Answer View Explanation
Ans.   D
Explanation :

7) What is true about Constructo

  • 1) Its name is plural of class name.
  • 2) Its name has * symbol before it.
  • 3) Its name is same as of class name.
  • 4) Its name has # symbol before it.
View Answer View Explanation
Ans.   C
Explanation :

8) Stacks are based o

  • 1) FIFO
  • 2) LIFO
  • 3) FILO
  • 4) All of above
View Answer View Explanation
Ans.   B
Explanation :

9) An explicitly defined destructor functi

  • 1) may be virtual
  • 2) may not be virtual
  • 3) will always be virtual
  • 4) will never be virtual
View Answer View Explanation
Ans.   A
Explanation :

10) Queues are based o

  • 1) LIFO
  • 2) FIFO
  • 3) LILO
  • 4) FILO
View Answer View Explanation
Ans.   B
Explanation :
Get Free Current Affairs and Govt Jobs Alerts in your mailbox
Current Affairs
Govt Jobs

Testing