main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
Answer Posted / arif shaik
main()
{
int x=20,y=35;
x=y++ + x++;//x=(y+1) + (x+1) here y=35,x=21
//x=36 + 21 = 57
//x=57 ;here previous x=21 is overwritten by 57
y=++y + ++x;//y=(1+y) + (1+x) here y=35, x=58 bcoz y
value refers y's initial address which contain 35 then
//y=(1+35) + (1+57)=36+58= 94
printf("%d %d\n",x,y);
}
Output:
57 94
Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What is the scope of static variable in c?
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
Can you please explain the difference between strcpy() and memcpy() function?
Explain what is a stream?
List some applications of c programming language?
How can I implement sets or arrays of bits?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
The difference between printf and fprintf is ?
Do pointers need to be initialized?
Is multithreading possible in c?
What are the application of void data type in c?
What is the use of #include in c?
What header files do I need in order to define the standard library functions I use?
What is the purpose of main( ) in c language?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above