Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What does extern mean in a function declaration?

Answers were Sorted based on User's Feedback



What does extern mean in a function declaration?..

Answer / swetcha

extern is significant only with data declarations. In
function declarations, it can be used as a stylistic hint
to indicate that the function's definition is probably in
another source file, but there is no formal difference
between

extern int f();

and
int f();

Is This Answer Correct ?    91 Yes 14 No

What does extern mean in a function declaration?..

Answer / poornima

extern is a keyword that is prefixed in function
declaration. It means tht function definition is in source
file.
for eg.
source file contains int sum(int x,int y) definition part.
To make use of this function in file by simply declare as
extern int sum(int ,int); is a good practice.
But to compiler happy extern sum(); is enough.

Is This Answer Correct ?    34 Yes 16 No

What does extern mean in a function declaration?..

Answer / zxg

(from MSDN)
Functions declared as extern are visible throughout all source files in the program (unless you later redeclare such a function as static). Any function can call an extern function.

Function declarations that omit the storage-class specifier are extern by default.

Is This Answer Correct ?    4 Yes 3 No

What does extern mean in a function declaration?..

Answer / 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

More C Interview Questions

What do you mean by command line argument?

0 Answers   TCS,


How can I ensure that integer arithmetic doesnt overflow?

0 Answers  


Why can't I perform arithmetic on a void* pointer?

0 Answers  


What is the significance of c program algorithms?

0 Answers  


What is the Purpose of 'extern' keyword in a function declaration?

0 Answers  


What is structure packing in c?

0 Answers  


void main() { int a[]={1,2,3,4,5},i; for(i=0;i<5;i++) printf("%d",a++); getch(); }

3 Answers  


What does c value mean?

0 Answers  


How do I convert a string to all upper or lower case?

0 Answers  


What is #include stdio h?

0 Answers  


If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",a[0]); return 1; } what will be the output?

6 Answers   Hughes,


What is malloc return c?

0 Answers  


Categories