Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / alok kumar

++(*p) :- means that first increment the value of that variable which address holds p .than any operation will perform. ex:- int a=10;int *p; p=&a;
int c=++(*p);printf("%d,%d",c,*p);out put:-11 , 11 .


(*p)++ :- means that first assign the value than increment the value by 1. ex:- int a=10;int *p; p=&a;
int c=(*p)++;printf("%d,%d",c,*p);out put:-10 , 11 .

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we change the value of #define in c?

1001


Explain what is the most efficient way to store flag values?

1232


What is a floating point in c?

1075


What are the disadvantages of c language?

1200


What is a lvalue

1087


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

1218


Can include files be nested?

1117


What is string function in c?

990


What is use of #include in c?

1172


In a switch statement, explain what will happen if a break statement is omitted?

1076


Why c language?

1079


How arrays can be passed to a user defined function

1025


What is c language in simple words?

1068


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1137


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

1082