GATE CSE
First time here? Checkout the FAQ!
x
0 votes
28 views
Is there any difference between following declarations?

1: extern int fun();

2: int fun();

(a) Both are identical

(b) No difference, except extern int fun(); is probably in another file

(c) int fun(); is overrided with extern int fun()

; (d) None of these

-------------------------------------

i think both are same as compiler converts int func() to extern int func() implictly
asked in Programming by Veteran (12.6k points)   | 28 views

1 Answer

0 votes
extern keyword tells the compiler that the thing is in another file. so b according to me
answered by Veteran (13.4k points)  

see this http://www.geeksforgeeks.org/understanding-extern-keyword-in-c/

here it is written that extren is implicit

Related questions

0 votes
2 answers
1
0 votes
0 answers
2
+2 votes
1 answer
3
asked in Compiler Design by radha gogia Boss (6.7k points)   | 283 views


Top Users Mar 2017
  1. rude

    5236 Points

  2. sh!va

    3054 Points

  3. Rahul Jain25

    2920 Points

  4. Kapil

    2732 Points

  5. Debashish Deka

    2602 Points

  6. 2018

    1574 Points

  7. Vignesh Sekar

    1422 Points

  8. Akriti sood

    1402 Points

  9. Bikram

    1384 Points

  10. Sanjay Sharma

    1128 Points

Monthly Topper: Rs. 500 gift card

21,545 questions
26,881 answers
61,232 comments
23,243 users