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

Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

0 Answers  


what is d pitfalls of registers variables

3 Answers   TCS,


what is the different between if-else and switch statment (other than syntax)

26 Answers   CTS, Oracle, Scorpos,


What is the process to create increment and decrement stamen in c?

0 Answers  


Explain can static variables be declared in a header file?

0 Answers  






What is use of pointer?

0 Answers  


What are the 4 types of functions?

0 Answers  


Explain how can a program be made to print the name of a source file where an error occurs?

0 Answers  


Explain Function Pointer?

0 Answers   Wipro,


What is data structure in c language?

0 Answers  


What is the output for the following program #include<stdio.h> main() { char a[5][5],flag; a[0][0]='A'; flag=((a==*a)&&(*a==a[0])); printf("%d\n",flag); }

5 Answers   ADITI, Wipro,


write a program to rearrange the array such way that all even elements should come first and next come odd

0 Answers  


Categories