What does extern mean in a function declaration?

Answer Posted / aravind

Extern is nothing but a memory storage type.If we declare extern before the function than the variable can be accessed by that function not only locally but externally too.
extern int a=4
Int fun (int x)
{
x=a;
print gives a=4

Is This Answer Correct ?    8 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of typedef in structure in c?

547


Explain what is the benefit of using const for declaring constants?

617


What is declaration and definition in c?

526


What is scope rule of function in c?

553


Can we declare variables anywhere in c?

581






What is the scope of global variable in c?

559


Is it better to use malloc() or calloc()?

650


What does the && operator do in a program code?

698


What are the different types of endless loops?

625


number of times a digit is present in a number

1544


What are register variables? What are the advantage of using register variables?

688


Is null equal to 0 in sql?

656


what is the function of pragma directive in c?

627


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

14965


What is malloc return c?

601