Multiple choice

C++ allows us to declare a variable anywhere in the program.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

C++ allows variables to be declared anywhere in the program, not just at the beginning of a block. This is a key difference from C89. Variables can be declared at their point of first use, which improves code readability and allows initialization closer to where values are needed.