Home » C Programming » Declarations and Initializations

Identify which of the following are declarations 1 : extern int x; 2 : float square ( float x ) { ... } 3 : double pow(double, double);

Correct Answer: 1 and 3

Explanation:

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.

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion