Mastering C++: A Comprehensive Quiz Based on 'Thinking in C++

Question: 1 / 565

What does the declaration extern int i; imply about variable i?

It is a local variable.

It must be initialized immediately.

It is defined in another file or later in the same file.

A declaration of "extern int i;" indicates that variable i is defined in another file or later in the same file. It is not a local variable since it is not defined within the scope of the current file. It also does not have to be initialized immediately, unlike local variables which must be initialized before they can be used. Additionally, the use of "extern" implies that i is not a constant since constants cannot be referenced in other files or redefined within the same file. Therefore, the correct answer is C.

Get further explanation with Examzify DeepDiveBeta

It is a constant.

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy