C++ Language Basics MCQs. Multiple Choice Questions on the topic of C++ Language Basics.
C++ Language Basics MCQs
Who created C++ ??
a) Bjarne Stroustrup
b) Dennis Ritchie
c) Ken Thompson
d) Brian
Which of the following is a correct identifier in C++ ??
a) 7var_name
b) 7VARNAME
c) VAR_1234
d) $var_name
Which of the following is the correct syntax of including a user-defined header files in C++ ??
a) #include <userdefined.h>
b) #include <userdefined>
c) #include “userdefined”
d) #include [userdefined]
Which of the following feature is not provided by C ??
a) Pointers
b) Structures
c) References
d) Functions
C++ Language Basics MCQs
Which of the following escape sequence represents tab ??
a) \t
b) \t\r
c) \b
d) \a
Which of the following escape sequence represents carriage return ??
a) \r
b) \n
c) \n\r
d) \c
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
What are the formal parameters in C++ ??
a) Parameters with which functions are called
b) Parameters that 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
C++ Language Basics MCQs
What are the actual parameters in C++ ??
a) Parameters with which functions are called
b) Parameters that are used in the definition of a function
c) Variables other than passed parameters in a function
d) Variables that are never used in the function
Which of the following is called extraction/get from operator ??
a) <<
b) >>
c) >
d) <
Which of the following is called insertion/put to operator ??
a) <<
b) >>
c) >
d) <
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)
C++ Language Basics MCQs
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)
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)
More Posts
- Android MCQs
- Artificial Intelligence MCQs
- Blockchain MCQs
- C Language MCQs
- Computer Hardware MCQs
- Computer MCQs
- Computer Network MCQs
- Data Structure And Algorithm MCQs
- Java MCQs
- Javascript MCQs
- Kotlin MCQs
- NFT (Non-Fungible Token) MCQs
- OOP MCQs
- Operating System MCQs
- PHP MCQs
- Science And Technology MCQs
- Software Engineering MCQs
- SQL MCQs