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 does the format %10.2 mean when included in a printf statement?
Mention four important string handling functions in c languages .
Are comments included during the compilation stage and placed in the EXE file as well?
For what purpose null pointer used?
What is the difference between #include
What is the difference between fread buffer() and fwrite buffer()?
What is the purpose of main( ) in c language?
what are the advantages of a macro over a function?
How do you sort filenames in a directory?
What is sizeof return in c?
What is console in c language?
What are the modifiers available in c programming language?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
What are the different properties of variable number of arguments?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }