ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Code Snippets >> Programming Code >> C Code
 
 


 

 
 C Code interview questions  C Code Interview Questions (401)
 C++ Code interview questions  C++ Code Interview Questions (121)
 VC++ Code interview questions  VC++ Code Interview Questions (2)
 Java Code interview questions  Java Code Interview Questions (57)
 Dot Net Code interview questions  Dot Net Code Interview Questions (113)
 Visual Basic Code interview questions  Visual Basic Code Interview Questions (8)
 Programming Code AllOther interview questions  Programming Code AllOther Interview Questions (37)
Question
main()

   {

	extern int i;

	i=20;

      printf("%d",i);

   }
 Question Submitted By :: C-Code
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
Answer :

Linker Error : Undefined symbol '_i'

Explanation:

extern storage class in the following declaration,

extern int i;

specifies to the compiler that the memory for i is allocated
in some other program and that address will be given to the
current program at the time of linking. But linker finds
that no other variable of name i is available in any other
program with memory space allocated for it. Hence a linker
error has occurred .
 
Is This Answer Correct ?    25 Yes 3 No
Susie
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
plz send me all data structure related programs   2
pls anyone can help me to write a code to print the values in words for any value.Example:1034 to print as "one thousand and thirty four only"   2
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?   2
How to return multiple values from a function?   7
int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }   1
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }   5
int aaa() {printf(“Hi”);} int bbb(){printf(“hello”);} iny ccc(){printf(“bye”);} main() { int ( * ptr[3]) (); ptr[0] = aaa; ptr[1] = bbb; ptr[2] =ccc; ptr[2](); }   1
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); } Quick-Heal 1
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }   1
write a c program to Reverse a given string using string function and also without string function   1
what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);   2
main() { int i=400,j=300; printf("%d..%d"); }   3
 
For more C Code Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright © 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com