GATE CSE
First time here? Checkout the FAQ!
x
0 votes
31 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.8k points)   | 31 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.5k 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.8k points)   | 309 views


Top Users Apr 2017
  1. akash.dinkar12

    3366 Points

  2. Divya Bharti

    2540 Points

  3. Deepthi_ts

    2040 Points

  4. rude

    1966 Points

  5. Tesla!

    1768 Points

  6. Shubham Sharma 2

    1610 Points

  7. Debashish Deka

    1584 Points

  8. Prashant.

    1462 Points

  9. Arunav Khare

    1444 Points

  10. Kapil

    1414 Points

Monthly Topper: Rs. 500 gift card

22,072 questions
28,030 answers
63,195 comments
24,128 users