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

}



void pascal f(int i,int j,int k) { printf(“%d %d %d”,i, j, k); } ..

Answer / susie

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 ?    5 Yes 0 No

Post New Answer

More C Code Interview Questions

Write a program to print a square of size 5 by using the character S.

6 Answers   Microsoft,


void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }

1 Answers  


writte a c-programm to display smill paces

2 Answers  


write the function. if all the character in string B appear in string A, return true, otherwise return false.

11 Answers   Google,


#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }

1 Answers  






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

4 Answers   Corporate Society, HCL,


how can u draw a rectangle in C

53 Answers   Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,


main() { int i=5,j=6,z; printf("%d",i+++j); }

2 Answers  


Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.

3 Answers   Wipro,


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 Answers  


void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }

4 Answers  


write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details

2 Answers   TCS,


Categories