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   SiteMap shows list of All Categories in this site.
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 pascal f(int i,int j,int k)

      { 

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

      }

      void cdecl f(int i,int j,int k)

      { 

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

      }

      main()

      {

	int i=10;

      f(i++,i++,i++);

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

      i=10;

      f(i++,i++,i++);

      printf(" %d",i);

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

      10 11 12 13

      12 11 10 13

      Explanation:

      Pascal argument passing mechanism forces the arguments
to be called from left to right. cdecl is the normal C
argument passing mechanism where the arguments are passed
from right to left.
 
Is This Answer Correct ?    1 Yes 0 No
Susie
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }  2
Code for 1>"ascii to string" 2>"string to ascii" Global-Logic1
main() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above HCL2
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }  2
Given n nodes. Find the number of different structural binary trees that can be formed using the nodes. Aricent10
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18. Infosys6
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)  1
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }  1
void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(“%d”, i); }  1
How we print the table of 2 using for loop in c programing?  2
What are segment and offset addresses? Infosys1
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }  1
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }  1
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }  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
main() { int c=- -2; printf("c=%d",c); }  1
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above HCL1
main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }  1
main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }  1
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }  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