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

Answer Posted / ruchi

Answer is 57 and 94
bcoz precedence of the ++ operator is more than + operator
so y++ and x++ will be evaluated first before addition so
y++ will be 36 and x++ will be 21 after that 36 + 21 = 57
similar reasoning for y = ++y + ++x

Is This Answer Correct ?    8 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of 'auto' keyword in c programming?

669


What is function pointer c?

579


how to find binary of number?

3413


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

1896


what is use of malloc and calloc?

1373






Explain what are reserved words?

629


C program to find all possible outcomes of a dice?

1844


What is derived datatype in c?

627


What is console in c language?

599


Can a void pointer point to a function?

563


What are the two types of functions in c?

553


What is calloc() function?

614


Explain heap and queue.

575


What does sizeof int return?

581


What is the use of c language in real life?

521