Which of the following is a reserved keyword in C++?
Select an option, then click Submit answer.
- ○ class
- ○ function
- ○ integer
- ○ character
Loading demo links...
Showing 1–10 of 10 questions
Which of the following is a reserved keyword in C++?
Select an option, then click Submit answer.
Consider the code: int main() { return 0; } What does returning 0 from main conventionally indicate?
Select an option, then click Submit answer.
Which of the following is a character literal in C++?
Select an option, then click Submit answer.
Which built-in type should be used for a variable that stores only true or false?
Select an option, then click Submit answer.
What is the output of this code? int main() { std::cout << 7 / 2; return 0; }
Select an option, then click Submit answer.
What is the output of this code? int main() { std::cout << 7.0 / 2; return 0; }
Select an option, then click Submit answer.
In the expression a + b * c, which operation is evaluated first?
Select an option, then click Submit answer.
Why is the expression x != 0 && 10 / x > 1 safe when x is 0?
Select an option, then click Submit answer.
Which TWO of the following are floating-point literals in C++? Select TWO.
Select all that apply, then click Submit answer.
Which TWO statements correctly describe loop control in C++? Select TWO.
Select all that apply, then click Submit answer.
This page holds a free practice test for the CPE - C++ Certified Entry-Level Programmer (CPE-20-01) certification from C++ Institute. You will find 10 free questions, drawn from the full Study4Pass practice set of 75 questions for this exam. The questions follow the same topic balance as the real exam: Syntax, Literals, and Operators; Flow Control and Functions; Vectors and Pointers; Structures and Strings.
Pick an answer for each question and check it straight away — the correct answer and a full explanation appear under the question. There is no time limit and nothing to sign up for. When an explanation is not enough, use Ask AI: this is an AI-Enabled practice test, and Ask AI explains the concept behind the question in plain language. Ready for more? The full 75-question set adds a timed Exam Simulation mode, topic training for your weak areas, and a flagged-question review.
Covers C++ syntax elements, keywords, and code structures, built-in data types and literals, and the structure and declaration of main() and its parameters. It also covers arithmetic, relational, logical, bitwise, and assignment operators, operator precedence and associativity, short-circuit logic, and the cin, cout, and cerr streams with manipulators such as endl and setw.
C++ keywords and syntax, data types and literals, main() structure, operators and precedence, short-circuit logic, cin cout cerr, endl and setw manipulators
Covers conditional statements with if and else, while, do-while, and for loops with break and continue, goto and labeled statements, and multiple selection with switch, case, and default. It also covers defining, declaring, and invoking functions, return in typed and void functions, passing arguments by value, by reference, and by pointer, and basic recursion.
if else, while do for loops, break and continue, goto and labels, switch case default, function declaration and definition, return statements, pass by value reference and pointer, recursion
Covers declaring, initializing, and manipulating vectors and arrays including multidimensional arrays, and accessing vector storage with the data() method. It also covers declaring and initializing pointers including nullptr, dereferencing and the address-of operator, pointer conversions with static_cast and dynamic_cast, and dynamic memory management with new, delete, and delete[].
vectors and arrays, multidimensional arrays, vector data(), pointers and nullptr, dereferencing and address-of, static_cast and dynamic_cast, new delete and delete[]
Covers declaring and defining structures, accessing structure members with the dot operator, and declaring vectors of structures and accessing their fields. It also covers declaring, initializing, and manipulating std::string objects and performing basic string operations and comparisons.
structure declaration, dot operator member access, vectors of structures, std::string declaration and manipulation, string operations and comparisons
Yes — the 10 questions on this page are completely free, with no signup and no payment details needed.
75 questions. The 10 free questions above are a sample of that full set, in the same style and topic balance.
Yes — every question shows the correct answer with an explanation, and Ask AI can explain the concept behind a question in plain words if you want to go deeper.