Q1
Which statement best describes C++ compared with C?
Q2
An object in C++ is:
Q3
Which statement about a C++ reference is correct?
Q4
Which feature is valid for a pointer but not for a normal reference?
Q5
Function overloading in C++ requires functions to differ in:
Q6
Which of the following can be overloaded for a user-defined class?
Q7
A constructor in C++:
Q8
What is the correct purpose of a destructor?
Q9
Which statement about `new` is correct?
Q10
Which access level is the default inside a `class` in C++?
Q11
What is the main purpose of a namespace in C++?
Q12
Which statement correctly compares `struct` and `class` in C++?
Q13
Which memory area is typically used for local variables inside a function?
Q14
A copy constructor is generally called when:
Q15
Shallow copy becomes risky mainly when a class contains:
Q16
Which statement correctly describes copy assignment?
Q17
Inside a non-static member function, `this` points to:
Q18
A static data member in a class is:
Q19
Which statement about static member functions is correct?
Q20
A friend function is mainly used when:
Q21
Which statement about inline functions is most accurate?
Q22
Which option best describes a deep copy?
Q23
Compared with `malloc()`, `new` in C++ additionally:
Q24
Which statement about heap memory is correct?
Q25
Inheritance in C++ is mainly used to:
Q26
Which type of inheritance is supported in C++ but often discussed carefully because it can introduce ambiguity?
Q27
Polymorphism in C++ means:
Q28
Which is an example of runtime polymorphism in C++?
Q29
A virtual function is primarily used to enable:
Q30
Why is a virtual destructor important in a polymorphic base class?
Q31
A pure virtual function is declared using:
Q32
A class with at least one pure virtual function is usually:
Q33
Object slicing occurs when:
Q34
Which statement correctly compares overloading and overriding?
Q35
If a base pointer points to a derived object and the called method is not virtual, C++ generally uses:
Q36
Which statement about abstract classes is correct?
Q37
Templates in C++ are mainly used for:
Q38
Which statement best describes a class template?
Q39
The STL mainly provides:
Q40
Which container is usually the default choice when you need a dynamic array with fast random access?
Q41
Which statement about `list` is correct?
Q42
Which container keeps keys sorted by default?
Q43
The average-case strength of `unordered_map` is:
Q44
An iterator in C++ is best understood as:
Q45
A lambda expression in C++ is:
Q46
The main purpose of `auto` in C++ is to:
Q47
Which statement about smart pointers is correct?
Q48
Which smart pointer type represents exclusive ownership?
Q49
RAII in C++ mainly means:
Q50
The Rule of Five extends the Rule of Three by adding:
Q51
Which statement best describes move semantics?
Q52
Which statement about `const` member functions is correct?
Q53
Which null-pointer literal should be preferred in modern C++?
Q54
Which cast performs runtime-checked downcasting in a polymorphic class hierarchy?
Q55
Which cast is the lowest-level and should usually be used very carefully?
Q56
In a `vector`, `size()` returns:
Q57
In a `vector`, `capacity()` refers to:
Q58
Which statement about C++ exceptions is correct?
Q59
Which is an example of a compile-time error?
Q60
Which is more likely to be a runtime error?