1.

Which is the correct syntax for extern variable declaration?(a) extern data_type variable_name;(b) extern variable_name;(c) data_type variable_name extern;(d) extern (data_type)variable_name;I have been asked this question in unit test.Question is taken from Extern Variable topic in section Memory Allocation & Scope of Variable of Object Oriented Programming

Answer»

The correct answer is (a) extern data_type variable_name;

To EXPLAIN: The syntax firstly contains the KEYWORD extern. Then the data type of the VARIABLE is GIVEN. Then the variabel name is MENTIONED by which it will be used in the program.



Discussion

No Comment Found

Related InterviewSolutions