GATE CSE
First time here? Checkout the FAQ!
x
0 votes
19 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 ago in Programming by Veteran (10.1k points)   | 19 views

1 Answer

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

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

here it is written that extren is implicit

Related questions

0 votes
0 answers
1
+2 votes
1 answer
2
asked in Compiler Design by radha gogia Boss (6.7k points)   | 229 views
Top Users Jan 2017
  1. Debashish Deka

    7060 Points

  2. Habibkhan

    4674 Points

  3. Vijay Thakur

    4224 Points

  4. saurabh rai

    4008 Points

  5. sudsho

    3960 Points

  6. Arjun

    3108 Points

  7. GateSet

    3088 Points

  8. santhoshdevulapally

    3004 Points

  9. Bikram

    2976 Points

  10. Sushant Gokhale

    2744 Points

Monthly Topper: Rs. 500 gift card

18,810 questions
23,779 answers
51,414 comments
20,128 users