what is difference between ++(*p) and (*p)++

Answer Posted / vikram

here,*is the value at address operater;
according to heirarchy of operators,*is given the first
preference and then ++;
++(*p) means first incrementation of value at address of p
takes place and then execution takes place;
on the other hand,(*p)++ means first execution takes place
and then value at address of p is incremented

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is class and object in c?

583


How do you write a program which produces its own source code as output?

601


How can I send mail from within a c program?

577


What is a null pointer in c?

587


What is the modulus operator?

730






Is it better to use a macro or a function?

647


write a progrmm in c language take user interface generate table using for loop?

1571


What is the difference between exit() and _exit() function?

597


What is difference between far and near pointers?

600


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

1785


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

1738


What is the sizeof () a pointer?

543


How to compare array with pointer in c?

615


Why isnt there a numbered, multi-level break statement to break out

581


What is the benefit of using const for declaring constants?

581