C++ MCQ’s

C++ MCQ’s Home Page

C++ Basic 1
C++ Basic 2
C++ Basic 3
C++ Basic 4
C++ Basic 5
C++ OOPs Concepts 1
C++ OOPs Concepts 2
C++ OOPs Concepts 3
C++ OOPs Concepts 4
C++ OOPs Concepts 5

 

C++ Language MCQ’S | OOPs Concepts Set 2 4

16.
Which of the following is not a fundamental type is not present in C but present in C++?

a) int
b) float
c) bool
d) void

 

17.
What is the size of a boolean variable in C++?

a) 1 bit
b) 1 byte
c) 4 bytes
d) 2 bytes

 

18.
Which of the following is C++ equivalent for scanf()?

a) cin
b) cout
c) print
d) input

 

19.
Which of the following is C++ equivalent for printf()?

a) cin
b) cout
c) print
d) input

 

20.
Which of the following is the correct difference between cin and scanf()?

a) both are the same
b) cin is a stream object whereas scanf() is a function
c) scanf() is a stream object whereas cin is a function
d) cin is used for printing whereas scanf() is used for reading input