GATE CSE
First time here? Checkout the FAQ!
x
0 votes
45 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)   | 45 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 (14k 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
+3 votes
1 answer
3
asked in Compiler Design by radha gogia Boss (7.6k points)   | 384 views


Top Users Aug 2017
  1. ABKUNDAN

    4670 Points

  2. Bikram

    4576 Points

  3. akash.dinkar12

    3428 Points

  4. rahul sharma 5

    3124 Points

  5. manu00x

    2882 Points

  6. makhdoom ghaya

    2460 Points

  7. just_bhavana

    2142 Points

  8. Tesla!

    2050 Points

  9. stblue

    2030 Points

  10. joshi_nitish

    1686 Points


24,979 questions
32,079 answers
74,607 comments
30,153 users