main()

{

int i =10, j = 20;

clrscr();

printf("%d, %d, ", j-- , --i);

printf("%d, %d ", j++ , ++i);

}

a. 20, 10, 20, 10

b. 20, 9, 20, 10

c. 20, 9, 19, 10

d. 19, 9, 20, 10

Answers were Sorted based on User's Feedback



main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); ..

Answer / guest

c)

Is This Answer Correct ?    33 Yes 3 No

main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); ..

Answer / chand

ITS c 20 9 19 10

Is This Answer Correct ?    7 Yes 2 No

main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); ..

Answer / ramya

for right increment the value not change.
for the left increment the value change.
so j++=20,--i=9,j++=20,++i=10.

Is This Answer Correct ?    0 Yes 1 No

main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); ..

Answer / manoj singh

b.20,9,20,10

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More C Code Interview Questions

Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


void ( * abc( int, void ( *def) () ) ) ();

1 Answers  


void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }

1 Answers  


write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"

2 Answers  


int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }

2 Answers   CSC,






#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }

1 Answers  


All the combinations of prime numbers whose sum gives 32

1 Answers   HHH,


abcdedcba abc cba ab ba a a

2 Answers  


how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.

19 Answers   Cap Gemini, Infosys,


main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above

3 Answers   BrickRed, HCL,


#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }

2 Answers   CNSI,


What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }

1 Answers  


Categories