main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
Answer Posted / muhammad abdullah
#include<stdio.h>
#include<conio.h>
void main()
{
int x=20,y=35; (comment)//We delcare two variables and initialize them.
clrscr();
x=y++ + x++; (comment) /*As increment operator increases one in the value of variable.The value
of y is 35 and after increment of 1, the value of y will be 36.The value of
x=20 and after increment of 1, the value of x will be 21.Arithmetic operator
(+) adds both the values(36+21=57).So, the value of x=57.*/
y=++y + ++x; (comment) /*The value of y is 35.Due to increment operator the value of
y becomes 36.And we have ever got the value of x as it is x=57. Now,increment
operator add 1 in the value of x and the value of x will be 58.By adding
(36+58=94) we got the final value of y=94.*/
printf("The value of x=%d
The value of y=%d
",x,y);
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is void main ()?
Difference between MAC vs. IP Addressing
Why do we use null pointer?
If errno contains a nonzero number, is there an error?
How to write a code for reverse of string without using string functions?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
Hai what is the different types of versions and their differences
What is character set?
What language is windows 1.0 written?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What is the full form of getch?
Is printf a keyword?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
What are the salient features of c languages?
What does %d do in c?