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

How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com

11 Answers   Deshaw, Infosys,


main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }

1 Answers  


find simple interest & compund interest

2 Answers  


Code for 1>"ascii to string" 2>"string to ascii"

1 Answers   Aricent, Global Logic,


write a c-program to display the time using FOR loop

3 Answers   HCL,






Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };

1 Answers  


write a c program to print magic square of order n when n>3 and n is odd?

1 Answers   HCL,


main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); } a. Runtime error. b. 100 c. Some Integer not 100 d. None of the above

2 Answers   HCL, LG,


#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); }

1 Answers  


#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }

1 Answers  


How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!

1 Answers  


Write a program to receive an integer and find it's octal equivalent. How can i do with using while loop.

2 Answers  


Categories