main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
what is the output?
Answer Posted / sagar
here first in x = y++ + x++;
= (35+1) + (20+1);//here value of x is not
= 36 + 21; assigned to 21 as x++
= 57... and 'lly to y++....
now the value of x = 57.
now for y = ++y + ++x;
= (1+35) + (1+57);
= 36 + 58;
= 94...
therefore,after performing all operatioins we get,
x==57 And y==94....
| Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
What is type qualifiers?
If fflush wont work, what can I use to flush input?
What is wrong with this initialization?
What is the use of header files?
What are disadvantages of C language.
What are high level languages like C and FORTRAN also known as?
Are comments included during the compilation stage and placed in the EXE file as well?
Are enumerations really portable?
Can an array be an Ivalue?
What is pointer to pointer in c with example?
What do you mean by keywords in c?
What do you mean by recursion in c?
Write a program to print "hello world" without using a semicolon?
Explain what header files do I need in order to define the standard library functions I use?