main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}

what is the output?

Answer Posted / c

x=y++ + x++;

here we should assign the value and then the increment
the value and the new value should be stored in a specified
variable....
here it is......
X= 35 (value=36 is stored in y) + 20 ( value=21
is stored in x);
X=55
NOw the value of x=55..and Y=36..the next expression
changes to like this...

Y= 37+56=93

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is a const pointer?

640


provide an example of the Group by clause, when would you use this clause

1709


What is a null string in c?

589


What is a program?

665


What does the error 'Null Pointer Assignment' mean and what causes this error?

741






What are bitwise shift operators in c programming?

646


which is an algorithm for sorting in a growing Lexicographic order

1394


You have given 2 array. You need to find whether they will create the same BST or not. For example: Array1:10 5 20 15 30 Array2:10 20 15 30 5 Result: True Array1:10 5 20 15 30 Array2:10 15 20 30 5 Result: False One Approach is Pretty Clear by creating BST O(nlogn) then checking two tree for identical O(N) overall O(nlogn) ..we need there exist O(N) Time & O(1) Space also without extra space .Algorithm ?? DevoCoder guest Posted 3 months ago # #define true 1 #define false 0 int check(int a1[],int a2[],int n1,int n2) { int i; //n1 size of array a1[] and n2 size of a2[] if(n1!=n2) return false; //n1 and n2 must be same for(i=0;ia1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }

2712


How can I implement sets or arrays of bits?

607


What is clrscr ()?

637


what is bit rate & baud rate? plz give wave forms

1519


Explain how do you sort filenames in a directory?

607


What are header files why are they important?

580


Why is c called a structured programming language?

677


Which is more efficient, a switch statement or an if else chain?

583