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)++

Answers were Sorted based on User's Feedback



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

Answer / kalai

++(*p)-->pre-increment.
(*p)++-->post-increment.

Is This Answer Correct ?    14 Yes 4 No

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

Answer / pooja

++(*p) means that first increment the value which is in
pointer p and then starts further execution.

(*p)++ means that first value is assigned and then
incremented.

Is This Answer Correct ?    6 Yes 0 No

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

Answer / vicky

++(*p)means first incrementing and then performing the
operation;
(*p)++ means first performing the operation and then
incrementing.

Is This Answer Correct ?    6 Yes 0 No

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

Answer / arasu

++(*p)-->after the value is incremented, next line is
executed.
(*p)++-->after execution,it is incremented.

Is This Answer Correct ?    6 Yes 1 No

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

Answer / s.aswini

++(*p)-->it is denoted by first increment the value andthen
check the condition.
(*p)++-->it is denoted by first do the operation and then
increment the value.

Is This Answer Correct ?    6 Yes 2 No

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

Answer / ravi

++(*p)-> indicates increment the value pointed by pointer p.

(*p)++ -> indicates increment the address of p then retrieve
the value pointed to by p.

Is This Answer Correct ?    3 Yes 0 No

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

Answer / tejas

value that contained in p is incremented. (p is pointer.)

++(*p) --> pre-increment.
(*p)++ --> post-increment.

Is This Answer Correct ?    2 Yes 0 No

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

Answer / 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

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

Answer / 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

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

Answer / 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

More C Interview Questions

which header file contains main() function in c?

17 Answers   Google, HCL, TCS,


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

0 Answers   Huawei,


Toggle nth bit in a given integer - num

5 Answers   Qualcomm,


How to print India by nested loop? I IN IND INDI INDIA

4 Answers   NIIT, Wipro,


what is different between auto and local static? why should we use local static?

0 Answers  


Identify the operators that is not used with pointer a. && b. # c. * d. >>

2 Answers  


Find the O/p of the following struct node { char *name; int num; }; int main() { struct node s1={"Harry",1331}; struct node s2=s1; if(s1==s2) printf("Same"); else printf("Diff"); }

1 Answers  


Tell me a C program to display the following Output? 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5

3 Answers  


where does it flourished?

0 Answers   Microsoft,


Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0

6 Answers   Qualcomm,


what is the different between if-else and switch statment (other than syntax)

26 Answers   CTS, Oracle, Scorpos,


What is the OOPs concept?

3 Answers  


Categories