Register now or log in to join your professional community.
Postfix opreator =variable & operator.
Prefix opreator =operator & variable.
eg : a=42;
b=a++;
postfix operator form is a++ i.e, b=a then a=a+1;
prefix operator form is ++a i.e, a=a+1 then b=a;
Postfix - Use & Operate ( Ex : a++ )
Prefix - Operate & Use ( Ex : ++a )
For Example,
Assume a=1 and
if b=a++ then b=1
if b=++a then b=2
a=1;
b=a++;
c=++a;
value of b =1
value of c= 3