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 to make a scientific calculater ?
Here is a neat trick for checking whether two strings are equal
Can you pass an entire structure to functions?
Is c easy to learn?
How can I read data from data files with particular formats?
What is structure data type in c?
Can you apply link and association interchangeably?
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
What is the use of ?: Operator?
What is the best way to comment out a section of code that contains comments?
Write a program to reverse a string.
What is structure padding and packing in c?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What is new line escape sequence?
What are dangling pointers in c?