GATE CSE
First time here? Checkout the FAQ!
x
0 votes
27 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 (10.8k points)   | 27 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 (12.7k 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)   | 233 views
Top Users Jan 2017
  1. Debashish Deka

    9872 Points

  2. sudsho

    5596 Points

  3. Habibkhan

    5498 Points

  4. Bikram

    5350 Points

  5. Vijay Thakur

    4508 Points

  6. Arjun

    4458 Points

  7. Sushant Gokhale

    4410 Points

  8. saurabh rai

    4236 Points

  9. santhoshdevulapally

    3906 Points

  10. Kapil

    3892 Points

Monthly Topper: Rs. 500 gift card

19,480 questions
24,260 answers
54,208 comments
20,405 users