Question
Is the following statement a declaration or definition?
extern int i;
Answer: Option A
Was this answer helpful ?
Declaring is the way a programmer tells the compiler to expect a particular
type, be it a variable, class/struct/union type, a function type (prototype) or
a particular object instance. (ie. extern int i)
Declaration never reserves any space for the variable or instance in the
program's memory; it simply a "hint" to the compiler that a use of the variable
or instance is expected in the program.This hinting is technically called "forward
reference".
Was this answer helpful ?
More Questions on This Topic :
Question 3.
By default a real number is treated as a
....
Question 6.
What are the types of linkages?
....
Question 9.
Point out the error in the following program....
Submit Solution