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

what is the output?

Answer Posted / manishsoni

here first in
x = y++ + x++;
x=35+20;
x=55;

then x is incresed by 1;
x=56;
y=36

y=++y + ++x;
y=++36 + ++56;
y=37+57;

y=94;
x=57;
now the value of x = 57.
therefore,after performing all operatioins we get,
x==57 And y==94....

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can static variables be declared in a header file?

606


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1245


What is the use of parallelize in spark?

566


Can main () be called recursively?

613


What are the data types present in c?

615






Where can I get an ansi-compatible lint?

628


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

1633


What is stack in c?

595


Which is better between malloc and calloc?

654


Explain what is the advantage of a random access file?

648


For what purpose null pointer used?

592


What is the function of volatile in c language?

649


Explain what is meant by high-order and low-order bytes?

623


write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.

1974


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

601