Is the following statement a declaration or definition?
extern int i;
Answer: A
Correct answer: Declaration
extern int i; announces that an object named i of type int exists somewhere, without reserving storage for it. A definition is what allocates the storage, and there must be exactly one of those in the program however many declarations refer to it.
Please log in or register to report this question.