PRACTICE • LEARN • GROW
Module 1 Final Quiz: Getting Started MCQs
Solve topic-wise placement questions and improve your skills.
Module 1 Final Quiz: Getting Started Progress
0 of 12 completed
0%
Topic Track
You are viewing MCQs in preview mode. Log in to select options, submit answers, and track your progress.
Log In to Answer
1
Who created C++ and in what year was it first developed at Bell Labs?
A.
Dennis Ritchie in 1972
B.
Bjarne Stroustrup in 1979
C.
James Gosling in 1995
D.
Ken Thompson in 1983
Explanation & Key
Correct Answer:
2
Why is C++ chosen for game engines, operating systems, and high-frequency trading?
A.
Because it runs inside a garbage-collected virtual machine
B.
Because it compiles directly to native machine code with zero-overhead abstractions and direct hardware/memory control
C.
Because it is an interpreted dynamically-typed scripting language
D.
Because it does not support pointers or manual memory management
Explanation & Key
Correct Answer:
3
What is the purpose of '#include ' in a standard C++ program?
A.
It defines the main entry point function
B.
It is a preprocessor directive that pulls in the input/output stream declarations (like cout and cin)
C.
It compiles the program directly into machine code
D.
It allocates heap memory for the program
Explanation & Key
Correct Answer:
4
What is the traditional meaning of 'return 0;' at the end of main() in C++?
A.
The program encountered a fatal runtime error
B.
The program finished successfully and exited with status 0
C.
The program restarted itself
D.
Zero bytes of memory were allocated
Explanation & Key
Correct Answer:
5
What are the four chronological stages of the C++ build pipeline?
A.
Compiler -> Preprocessor -> Linker -> Assembler
B.
Preprocessor -> Compiler -> Assembler -> Linker
C.
Assembler -> Compiler -> Linker -> Interpreter
D.
Preprocessor -> Linker -> Compiler -> Loader
Explanation & Key
Correct Answer:
6
What is the crucial difference between a compile-time error and a link-time error?
A.
Compile-time errors occur when running the program; link-time errors occur before compilation
B.
A compile-time error means syntax or type checking failed; a link-time error means a declared symbol (function/variable) was never defined anywhere
C.
Compile-time errors only happen with headers; link-time errors only happen with comments
D.
There is no difference; compilers and linkers are identical
Explanation & Key
Correct Answer:
7
Which of the following is a fundamental (built-in primitive) type in C++?
A.
std::vector
B.
std::string
C.
double
D.
struct
Explanation & Key
Correct Answer:
8
Which category of C++ data types includes Arrays, Pointers, and References?
A.
Fundamental types
B.
Derived types
C.
User-defined types
D.
Generic types
Explanation & Key
Correct Answer:
9
What is the memory and precision trade-off between float and double in standard C++?
A.
float uses 8 bytes with 16 digits of precision; double uses 4 bytes with 7 digits
B.
float uses 4 bytes with ~7 digits of precision; double uses 8 bytes with ~15-17 digits of precision
C.
Both occupy identical memory and precision
D.
double can only store whole integers
Explanation & Key
Correct Answer:
10
What is the output of the following C++ code snippet?
int a = 10;
if (a = 5) {
cout << "Yes";
} else {
cout << "No";
}
A.
Compilation Error
B.
No
C.
Yes
D.
Undefined Behavior
Explanation & Key
Correct Answer:
11
What is the result of evaluating: int x = 14 % 4 in C++?
A.
3
B.
2
C.
3.5
D.
0
Explanation & Key
Correct Answer:
12
Which of the following logical operators performs short-circuit logical AND in C++?
A.
&
B.
and_then
C.
&&
D.
AND
Explanation & Key
Correct Answer:
Question Palette
Answered
Current
Not Attempted
Wrong