recategorized by
522 views
0 votes
0 votes
++*p  and (*p)++

both are same????
recategorized by

1 Answer

2 votes
2 votes
++*p  means first we will access the value pointed by p and then we will increment that value(as it is preincrement so incremented value will be printed )

and (*p)++ first we will acesss the value pointed by p and print it then we will increment the value (as it is post increment)

Related questions

2 votes
2 votes
2 answers
1
srestha asked May 13, 2019
1,050 views
Can someone explain the output of this code? and what (char*) is doing actually?#include<stdio.h struct Ournode{ char x, y, z; }; int main() { struct Ournode p={'1', '0',...
0 votes
0 votes
1 answer
2
Ashish Roy 1 asked Apr 11, 2019
621 views
X=2;Y=++x * ++x * ++x ;Printf("%d",Y);In the above question, we have to use the final value of x or it will be evaluated seperately and then multiplied.Ex: Y= 3*4*5; or Y...
1 votes
1 votes
1 answer
4
Na462 asked Jan 8, 2019
1,463 views
#include <stdio.h>main (){unsigned x = -10;int X = 20;if (X x) printf ("Hello");else{ printf ("%d",x); printf ("Jello"); }}