The loop do { /* code */ } while(_______); will always execute the code block at least once.
- FALSE
- 1
- TRUE
- sometimes
The "do-while" loop in C++ always executes its body once before checking the condition. So even if the condition in the "while" part is "false", the body of the loop will execute once. This differentiates it from the "while" loop which checks the condition before the first execution.
Loading...
Related Quiz
- What is the default access specifier for a base class in C++?
- A function that calls itself directly or indirectly is known as a _______ function.
- You’re maintaining a legacy C++ codebase which has limited comments and documentation. You encounter an erratic bug that only appears in the optimized build. What strategy might be most effective in isolating and fixing the bug?
- When dealing with binary files, the ios::binary mode should be used in conjunction with another mode such as _______.
- Which of the following data structures is not implemented as a container in C++ STL?