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
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
explain what is fifo?
What is the c value paradox and how is it explained?
Explain what is the difference between #include and #include 'file' ?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
Is r written in c?
What are the types of functions in c?
What is the newline escape sequence?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
What is the need of structure in c?
Can an array be an Ivalue?
What is malloc and calloc?
Explain what are multidimensional arrays?
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
What is meant by initialization and how we initialize a variable?