Answer Posted / gv_shreenivas
The postfix ++ and -- operators essentially have higher
precedence than the prefix unary operators. Therefore, *i++
is equivalent to *(i++); it increments i, and returns the
value which i pointed to before i was incremented. To
increment the value pointed to by i, use (*i)++ (or perhaps
++*i, if the evaluation order of the side effect doesn't
matter).
Ref:comp.lang.c FAQ list ยท Question 4.3
| Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
How can you restore a redirected standard stream?
What do you mean by Recursion Function?
What is non linear data structure in c?
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
What is the difference between text files and binary files?
What is #pragma statements?
What is #include conio h?
Write a code to generate a series where the next element is the sum of last k terms.
What are enums in c?
What is difference between constant pointer and constant variable?
What is struct node in c?
How do you list files in a directory?
What is meant by recursion?
When should the register modifier be used? Does it really help?
Explain how do you print only part of a string?