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

what is the output?

Answer Posted / c

x=y++ + x++;

here we should assign the value and then the increment
the value and the new value should be stored in a specified
variable....
here it is......
X= 35 (value=36 is stored in y) + 20 ( value=21
is stored in x);
X=55
NOw the value of x=55..and Y=36..the next expression
changes to like this...

Y= 37+56=93

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we use void main in c?

582


What is the difference between text and binary i/o?

581


Describe dynamic data structure in c programming language?

593


how to introdu5ce my self in serco

1517


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

797






What are the types of operators in c?

602


What is void main ()?

603


Differentiate between a for loop and a while loop? What are it uses?

658


Why doesnt this code work?

609


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

576


What is function prototype?

601


can we implement multi-threads in c.

653


explain what is a newline escape sequence?

678


What is the maximum length of an identifier?

655


How many levels deep can include files be nested?

640