ALLInterview.com :: Home Page KalAajKal.com
 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                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Code Snippets  >>  Programming Code  >>  C Code
 
 


 

 
 C Code interview questions  C Code Interview Questions
 C++ Code interview questions  C++ Code Interview Questions
 VC++ Code interview questions  VC++ Code Interview Questions
 Java Code interview questions  Java Code Interview Questions
 Dot Net Code interview questions  Dot Net Code Interview Questions
 Visual Basic Code interview questions  Visual Basic Code Interview Questions
 Programming Code AllOther interview questions  Programming Code AllOther Interview Questions
Question
void main()

{

	int i=i++,j=j++,k=k++;

      printf(“%d%d%d”,i,j,k);

}
 Question Submitted By :: Susie
I also faced this Question!!     Rank Answer Posted By  
 
  Re: void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
Answer
# 1
Answer :  

      Garbage values.

      Explanation:

      An identifier is available to use in program code from
the point of its declaration. 

So expressions such as  i = i++ are valid statements. The i,
j and k are automatic variables and so they contain some
garbage value. Garbage in is garbage out (GIGO).
 
Is This Answer Correct ?    3 Yes 0 No
Susie
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
main() { 41printf("%p",main); }8  1
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?  1
how to return a multiple value from a function? Wipro2
main() { static int var = 5; printf("%d ",var--); if(var) main(); }  1
main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }  1
struct point { int x; int y; }; struct point origin,*pp; main() { pp=&origin; printf("origin is(%d%d)\n",(*pp).x,(*pp).y); printf("origin is (%d%d)\n",pp->x,pp->y); }  1
union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4 HCL1
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }  1
Give a one-line C expression to test whether a number is a power of 2. Microsoft8
how to return a multiple value from a function? Wipro5
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }  1
main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }  1
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world” HCL5
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }  1
write the function. if all the character in string B appear in string A, return true, otherwise return false. Google10
main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }  1
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }  1
main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }  1
prog. to produce 1 2 3 4 5 6 7 8 9 10  2
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }  1
 
For more C Code Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2009  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com