GATE CSE
First time here? Checkout the FAQ!
x
0 votes
63 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 (14.8k points) 15 152 317 | 63 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 (15.1k points) 17 53 133

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
asked in GATE by smartmeet Loyal (4.9k points) 4 44 88 | 358 views
0 votes
0 answers
2
asked by akash3052 (55 points) 1 1 4 | 59 views
+3 votes
1 answer
3
asked in Compiler Design by radha gogia Boss (7.7k points) 41 203 312 | 436 views


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23678 Points

  2. Bikram

    17268 Points

  3. Habibkhan

    8950 Points

  4. srestha

    6446 Points

  5. Debashish Deka

    5478 Points

  6. jothee

    5128 Points

  7. Sachin Mittal 1

    4882 Points

  8. joshi_nitish

    4486 Points

  9. sushmita

    4032 Points

  10. Rishi yadav

    3974 Points


Recent Badges

Popular Question Hira Thakur
Notable Question amaity
Notable Question srestha
Nice Answer Madhab
Renewal Madhab
Popular Question sourabh
Notable Question K ANKITH KUMAR
Great Answer saloni
Resurrection saloni
Great Question Ishrat Jahan
27,406 questions
35,255 answers
84,502 comments
33,454 users