Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which is false ?

  • A.A variable defined once can be defined again with different scope
  • B.A single variable cannot be defined with two different types in the same scope
  • C.A variable must be declared and defined at the same time
  • D.A variable refers to a location in memory

Answer: C

Correct answer: A variable must be declared and defined at the same time

The two can be separated, which is exactly what extern is for - the declaration makes the name usable and the definition, elsewhere, allocates the storage. The other three statements are all true, including that shadowing in an inner scope is permitted.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.