main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}

output??

Answers were Sorted based on User's Feedback



main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / madhu

hey how come 15 ....
ans is 11,16

Is This Answer Correct ?    5 Yes 7 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / sateesndaruh varma ba

x=x++ it means the x value is first assignto x and then increment by 1

so here in this given value of x=10
it become" x= 11" in output

y=++y it means pre increment so first y value is incremented and than it will assignto y

finally y=16

Is This Answer Correct ?    2 Yes 5 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / daya

11 16

Is This Answer Correct ?    2 Yes 5 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / ankit

11 16 is correct ..
value of x is incremented and is saved in memeory and at
the time of display it will be 11,
as in case of y it will be incremented and will store the
incremented value to be displayed for y.

Is This Answer Correct ?    0 Yes 3 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / sheikh rasel

11

15

Is This Answer Correct ?    2 Yes 10 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / nirmala

11,15

Is This Answer Correct ?    3 Yes 19 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / rasel

11 15

Is This Answer Correct ?    0 Yes 16 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / kalai

10,15

Is This Answer Correct ?    1 Yes 22 No

main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??..

Answer / mannucse

35 39

Is This Answer Correct ?    6 Yes 48 No

Post New Answer

More C Interview Questions

Tell me a C program to display the following Output? 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5

3 Answers  


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

0 Answers  


i=10,j=20 j=i,j?(i,j)?i:j:j print i,j

1 Answers   CSC,


How can I increase the allowable number of simultaneously open files?

1 Answers   ABC,


What are the 4 types of programming language?

0 Answers  






What do mean by network ?

0 Answers  


write a program that explain #define and # undef directive

1 Answers  


Why is c called a structured programming language?

0 Answers  


Write a program to generate random numbers in c?

0 Answers  


Explain what is the most efficient way to store flag values?

0 Answers  


Is c dynamically typed?

0 Answers  


What does c mean?

0 Answers  


Categories