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
Explain what is a const pointer?
provide an example of the Group by clause, when would you use this clause
What is a null string in c?
What is a program?
What does the error 'Null Pointer Assignment' mean and what causes this error?
What are bitwise shift operators in c programming?
which is an algorithm for sorting in a growing Lexicographic order
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;i
How can I implement sets or arrays of bits?
What is clrscr ()?
what is bit rate & baud rate? plz give wave forms
Explain how do you sort filenames in a directory?
What are header files why are they important?
Why is c called a structured programming language?
Which is more efficient, a switch statement or an if else chain?