main()
{
int i=0;
while(+(+i--)!=0)
i-=i++;
printf(i);
}

Answers were Sorted based on User's Feedback



main() { int i=0; while(+(+i--)!=0) i-=i++; printf(i); }..

Answer / cholan

-1

Is This Answer Correct ?    5 Yes 1 No

main() { int i=0; while(+(+i--)!=0) i-=i++; printf(i); }..

Answer / vignesh1988i

the answer will be -1

Is This Answer Correct ?    2 Yes 0 No

main() { int i=0; while(+(+i--)!=0) i-=i++; printf(i); }..

Answer / vinod

Error.... Cannot convert int to char error at printf(i). If they replaced printf(i) to printf("%d",i) then it would be -1.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

Why is c so popular?

0 Answers  


write a program to print infinte number

4 Answers  


write a C program to print the program itself ?!

16 Answers   TCS,


There seem to be a few missing operators ..

0 Answers  


how to find anagram without using string functions using only loops in c programming

1 Answers   Mind Tree, TCS,






What is wrong with this declaration?

0 Answers  


Write a program to reverse a linked list in c.

0 Answers   DELL, HAL,


String concatenation

2 Answers  


How can I pad a string to a known length?

0 Answers  


I have one doubt. What does below statement mean? #define sizeof(operator) where operator can be int or float etc. Does this statement meaningful and where it can be used?

1 Answers  


Why do we use int main?

0 Answers  


What does sizeof return c?

0 Answers  


Categories