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 meant by keywords in c?

846


What is #define?

799


What is the difference between far and near ?

935


How does pointer work in c?

839


What is extern c used for?

779


What are c preprocessors?

926


Process by which one bit pattern in to another by bit wise operation is?

862


Can we change the value of constant variable in c?

823


find out largest elemant of diagonalmatrix

1887


What is %g in c?

840


Should I learn data structures in c or python?

769


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

965


Why functions are used in c?

847


Is the exit() function same as the return statement? Explain.

860


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

1852