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


Please Help Members By Posting Answers For Below Questions

What is void main ()?

617


Difference between MAC vs. IP Addressing

644


Why do we use null pointer?

609


If errno contains a nonzero number, is there an error?

809


How to write a code for reverse of string without using string functions?

1583






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

2240


Hai what is the different types of versions and their differences

1493


What is character set?

687


What language is windows 1.0 written?

578


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

762


What is the full form of getch?

587


Is printf a keyword?

762


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

637


What are the salient features of c languages?

627


What does %d do in c?

547