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 2

C++ Fundamentals | Set 2


11. What are the formal parameters in C++?

a) Parameters with which functions are called
b) Parameters which are used in the definition of the function
c) Variables other than passed parameters in a function
d) Variables that are never used in the function



12. Which function is used to read a single character from the console in C++?

a) cin.get(ch)
b) getline(ch)
c) read(ch)
d) scanf(ch)



13. Which function is used to write a single character to console in C++?

a) cout.put(ch)
b) cout.putline(ch)
c) write(ch)
d) printf(ch)



14. What is a constant that contains a single character enclosed within single quotes?

a) Numeric
b) Fixed
c) Character
d) Floating Point



15. A C++ code line ends with ___

a) A Semicolon (;)
b) A Fullstop(.)
c) A Comma (,)
d) A Slash (/)



16. What are the escape sequences?

a) Set of characters that convey special meaning in a program
b) Set of characters that whose use are avoided in C++ programs
c) Set of characters that are used in the name of the main function of the program
d) Set of characters that are avoided in cout statements



17. Which of the following escape sequence represents carriage return?

a) \r
b) \n
c) \n\r
d) \c



18. Which of the following escape sequence represents tab?

a) \t
b) \t\r
c) \b
d) \a



19. Which of the following is called insertion/put to operator?

a) >>
b) <<
c) >
d) <



20. Which of the following is called extraction/get from operator?

a) <<
b) >>
c) >
d) <



- Related Topics