main()
{
int i=0;
while(+(+i--)!=0)
i-=i++;
printf("%d",i);
}
Answer Posted / rayan
ans is -1.
Initially i == 0, when it enters into while loop
while(+(+i--)!0)
in 1st iteration i value ll be 0 only due to post decrement
operator.
in second iteration as i gets its post decremented value n
becomes -1 & -1 ~= 0 condition gets true & while loop breaks.
here + operator in the loop is doing ntg.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the use of function in c?
How can a process change an environment variable in its caller?
What is the difference between functions getch() and getche()?
What is wrong with this program statement? void = 10;
Why c is a mother language?
How do we make a global variable accessible across files? Explain the extern keyword?
How many levels of indirection in pointers can you have in a single declaration?
Is array name a pointer?
How many types of arrays are there in c?
In a switch statement, what will happen if a break statement is omitted?
What is volatile variable in c?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
In a byte, what is the maximum decimal number that you can accommodate?
what are the different storage classes in c?