Which is the correct syntax for extern function declaration?

Ngô Quốc Huy

New member
Which is the correct syntax for extern function declaration?
A. extern function_name(argument_list);
B. extern return_type function_name(argument_list);
C. extern (return_type)function_name(argument_list);
D. return_type extern function_name(argument_list);
 
Answer: b
Explanation: The syntax must contain the keyword extern first, to denote that the function is extern. Though the function are extern by default but among the given choices, it should contain the keyword, for explicit declaration. Then the usual function declaration follows.
 

Tìm kiếm

Back
Top