World Languages, asked by dainvincible1, 1 year ago

: typedef long a;
extern int a c;
2 : typedef long a;
extern a int c;
3 : typedef long a;
extern a c;

A. 1 correct
B. 2 correct
C. 3 correct
D. 1, 2, 3 are correc

Answers

Answered by Anonymous
0
3 correct that is  typedef long a; extern a c
Answered by snehitha2
6
1 : typedef long a;
extern int a c;
2 : typedef long a;
extern a int c;
3 : typedef long a;
extern a c;

Option C is correct.
Means typedef long a;
extern a c; is correct

Because:-
1 : typedef long a;
extern int a c;
When we compile the statement, it becomes as typedef long a;
extern int a c; which results un “Declaration syntax error”

2 : typedef long a;
extern a int c;
When we compile the statement,it becomes extern long int c; which results in "Too many types in declaration error".

3 : typedef long a;
extern a c;
When we compile the statement, it becomes extern long c; .This is a valid c declaration statement. It says variable c is long data type and defined in some other file or module.

Hope it helps
Similar questions