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

Write a program to receive an integer and find its octal equivalent?

7 Answers  


What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;

1 Answers  


To reverse an entire text file into another text file.... get d file names in cmd line

0 Answers   Subex,


#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }

3 Answers  


Print an integer using only putchar. Try doing it without using extra storage.

2 Answers  






main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }

1 Answers  


Display the time of the system and display the right time of the other country

1 Answers  


int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }

1 Answers  


void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }

2 Answers  


How can i find first 5 natural Numbers without using any loop in c language????????

2 Answers   Microsoft,


struct Foo { char *pName; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName); } a. Your Name b. compile error c. Name d. Runtime error

3 Answers   HCL,


#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?

2 Answers  


Categories