Sail E0 Webinar
Question

Identify which of the following are declarations

1: extern int x;

2: float square ( float x ) { ... }

3: double pow(double, double);


Options:
A .  1
B .  2
C .  1 and 3
D .  3
Answer: Option C

extern int x; - is an external variable declaration.
double pow(double, double); - is a function prototype declaration.
Therefore, 1 and 3 are declarations. 2 is definition.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers