what is difference between ++(*p) and (*p)++
Answer Posted / manju
both increments the value not the address. but the
difference lies in post and pre increment..
for example
main()
{
int i=2,*p;
p=&i;
}
when (*p)++ is given the o/p will be 2.
and in next line the value is incremented. in ++(*p)
the value is 3 since it is post
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do you determine whether to use a stream function or a low-level function?
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
List the difference between a "copy constructor" and a "assignment operator"?
Why do we use main function?
Did c have any year 2000 problems?
What is structure data type in c?
What language is windows 1.0 written?
What is pass by reference in functions?
Are local variables initialized to zero by default in c?
Explain pointers in c programming?
Explain argument and its types.
What is the difference between exit() and _exit() function in c?
Is c pass by value or reference?
Can you apply link and association interchangeably?
What is the main difference between calloc () and malloc ()?