Classes and Objects in C++ Programming Questions and Answers - 1
Question: 1
Bjarne Stroustrup initially named C++ as
(A) C with classes
(B) Advanced C
(C) Deep C
(D) D
Ans: A
C with classes
Question: 2
Which of the following statements in NOT true?
(A) A non member function cannot access the private data of a class
(B) The return type of a member function cannot be object data type
(C) Several different classes can use the same function name
(D) Member functions can be of static type
Ans: D
Member functions can be of static type
Question: 3
int ex:: output ()
Which of the following is true with reference to the above line?
(A) The function output returns integer data type
(B) The function output returns ex type of data
(C) The class output returns integer type of data
(D) The function ex returns integer type of data
Ans: A
The function output returns integer data type
Question: 4
The body of the class starts and ends with
(A) Braces i.e.., {}
(B) Semi colon(;)
(C) Start and stop
(D) Begin and end
Ans: A
Braces i.e.., {}
Question: 5
Data abstraction in C++ is achieved by
(A) Encapsulation()
(B) Data Hiding()
(C) Polymorphism()
(D) Inheritance()
Ans: B
Data Hiding()
DC Generator Questions and Answers Pdf More
Electromagnetic Induction Quiz Questions and Answers More
Basic Electronics Quiz Questions with Answers Pdf More
Wireless Communication MCQ Questions with Answers More
Digital Communication Quiz Questions and Answers Pdf More
7000+ Physics Questions and Answers Pdf Free Download More
General Knowledge Mock Test 2020-2021 More
TNPSC Aptitude Stocks and Shares Questions & Answers More
1000+ Mphasis Aptitude Questions and Answers Pdf More
TNPSC Physics Quiz More