Identify which of the following are declarations
1 : extern int x;
2 : float square ( float x ) { ... }
3 : double pow(double, double);
Answers
Answered by
5
Identify which of the following are declarations
1 : extern int x;
2 : float square ( float x ) { ... }
3 : double pow(double, double);
Answer:-
Both 1 and 3 are declarations.
extern int x; is external variable declaration
2 is definition
double pow(double, double); - is a function prototype declaration.
Hope it helps
1 : extern int x;
2 : float square ( float x ) { ... }
3 : double pow(double, double);
Answer:-
Both 1 and 3 are declarations.
extern int x; is external variable declaration
2 is definition
double pow(double, double); - is a function prototype declaration.
Hope it helps
Answered by
0
Explanation:
In the following program where is the variable a getting defined and where it is getting declared?
#include int main() { extern int a; printf("%d\n", a); return 0; } int a=20; A. extern int a is declaration, int a = 20 is the definitionB. int a = 20 is declaration, extern int a is the definitionC. int a = 20 is definition, a is not definedD. a is declared, a is not defined
Similar questions
Business Studies,
8 months ago
Math,
8 months ago
Math,
8 months ago
World Languages,
1 year ago
French,
1 year ago
English,
1 year ago
Math,
1 year ago
English,
1 year ago