Digital Design - Expert Advise
Enhance knowledge in Digital VLSI domain - By Rahul Jain
Jan 19, 2026
C/C++ MCQ - Check your skill set
C / C++ MCQ Quiz
C / C++ Interview MCQ Test
1. Which keyword prevents a variable from being modified?
static
volatile
const
register
2. Which operator is used to allocate memory dynamically in C++?
malloc
alloc
new
create
3. Which feature supports runtime polymorphism?
Templates
Overloading
Virtual functions
Macros
4. What is sizeof(char)?
2
4
1
Compiler dependent
5. Which container allows fast random access?
list
map
vector
set
6. What is a dangling pointer?
Pointer not initialized
Pointer pointing to freed memory
Pointer to pointer
Constant pointer
7. Which function frees memory allocated by malloc?
delete
remove
free
clear
8. Which keyword is used to inherit a class?
inherits
extends
public
using
9. Which is NOT a C++ access specifier?
private
protected
public
internal
10. What does STL stand for?
Standard Type Library
System Template Library
Standard Template Library
Static Template Library
11. Which loop executes at least once?
for
while
do-while
foreach
12. Which pointer manages memory automatically?
raw pointer
smart pointer
void pointer
null pointer
13. What is RAII?
Runtime API Interface
Resource Acquisition Is Initialization
Random Access Initialization
Resource Allocation In Interface
14. Which keyword avoids compiler optimization?
static
const
volatile
extern
15. What is the output of sizeof(int)?
2
4
Depends on compiler
Always 8
Submit Quiz
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment