are created outside a block
are known only to that block
continue to exist when their block ends
are illegal in C++
Answer is Right!
Answer is Wrong!
The correct answer is: B. are known only to that block.
A local variable is a variable that is declared inside a function or a block. It is known only to the function or block in which it is declared. It is created when the function or block is entered and destroyed when the function or block is exited.
Option A is incorrect because local variables are created inside a block.
Option C is incorrect because local variables are destroyed when their block ends.
Option D is incorrect because local variables are legal in C++.