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++ MCQ’S | Basics 1

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

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)

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)

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


Which of the following escape sequence represents carriage return?

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

Visitor Counter