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


Please Help Members By Posting Answers For Below Questions

what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

667


what is use of malloc and calloc?

1379


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

651


What is the difference between typedef struct and struct?

592


What is spark map function?

578






Write a C program to count the number of email on text

1412


What is 1f in c?

1832


When should structures be passed by values or by references?

579


What are shell structures used for?

595


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

606


What's the best way of making my program efficient?

621


What is the difference between text and binary i/o?

586


Explain how are portions of a program disabled in demo versions?

649


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2405


Is stack a keyword in c?

632