GATE CSE
First time here? Checkout the FAQ!
x
0 votes
35 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 (13.2k points)   | 35 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.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
2 answers
1
0 votes
0 answers
2
+2 votes
1 answer
3
asked in Compiler Design by radha gogia Boss (6.9k points)   | 361 views


Top Users Jun 2017
  1. Bikram

    3694 Points

  2. Hemant Parihar

    1484 Points

  3. junaid ahmad

    1432 Points

  4. Arnab Bhadra

    1398 Points

  5. Niraj Singh 2

    1311 Points

  6. Rupendra Choudhary

    1194 Points

  7. rahul sharma 5

    1114 Points

  8. Arjun

    930 Points

  9. srestha

    928 Points

  10. Debashish Deka

    896 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 Jun 19 - 25
  1. Bikram

    1950 Points

  2. Niraj Singh 2

    1306 Points

  3. junaid ahmad

    502 Points

  4. sudsho

    410 Points

  5. akankshadewangan24

    388 Points


23,354 questions
30,065 answers
67,363 comments
28,382 users