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 i;

      	printf("%d\n",i);

		{

			int i=20;

      		printf("%d\n",i);

		}

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

Linker Error : Unresolved external symbol i

Explanation:

The identifier i is available in the inner block and so
using extern has no use in resolving it.
 
Is This Answer Correct ?    2 Yes 0 No
Susie
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
void main() { int i=i++,j=j++,k=k++; printf(%d%d%d,i,j,k); }   1
How to access command-line arguments?   4
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); } Cisco 3
What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }   1
struct Foo { char *pName; char *pAddress; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); obj->pName = malloc(100); obj->pAddress = malloc(100); strcpy(obj->pName,"Your Name"); strcpy(obj->pAddress, "Your Address"); free(obj); printf("%s", obj->pName); printf("%s", obj->pAddress); } a. Your Name, Your Address b. Your Address, Your Address c. Your Name Your Name d. None of the above HCL 2
why the range of an unsigned integer is double almost than the signed integer.   1
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }   1
How we will connect multiple client ? (without using fork,thread) TelDNA 3
write a c program to Reverse a given string using string function and also without string function   1
Write a program to print a square of size 5 by using the character S. Microsoft 5
Is the following code legal? struct a { int x; struct a b; }   1
print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!! Tata-Elxsi 34
 
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