Declarations and Initializations - Point Out Correct Statements :: Discussion


6.Which of the structure is correct?
A.1 correct
B.2 correct
C.3 correct
D.1, 2, 3 are correct
Answer:  Option  C
Explanation:

typedef long a;
extern int a c;
 while compiling this statement becomes extern int long c;. This will result in to "Declaration syntax error".

typedef long a;
extern a int c;
 while compiling this statement becomes extern long int c;. This will result in to "Too many types in declaration error".

typedef long a;
extern a c;
 while compiling this statement 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.

So, Option C is the correct answer.

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers