Loading...

C++ Multiple Choice Questions

Our C++ questions and answers focuses on all areas of C++ programming language covering 100+ topics in C++

C++ Fundamentals MCQ | Set 3

C++ Fundamentals | Set 3


21. A language which has the capability to generate new data types are called ________________

a) Extensible
b) Overloaded
c) Encapsulated
d) Reprehensible



22. 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



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

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



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

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



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

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



26. 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



27. Which of the following is an exit-controlled loop?

a) for
b) while
c) do-while
d) all of the mentioned



28. Which of the following is an entry-controlled loop?

a) for
b) while
c) do-while
d) both while and for



29.In which part of the for loop termination condition is checked?
for(I;II;III)

a) I
b) II
c) III
d) IV



30. Which of the following is the scope resolution operator?

a) .
b) *
c) ::
d) ~



- Related Topics