Program :
#include
main()
{
int i=10,j;
j=i++; /* j value 10 , i value 11*/
/*post increment*/
printf("\n After post-increment: j value: %d , i value: %d \n",j,i);
j=++i; /* j value 12, i value 12*/
/*pre-increment*/
printf("\n After pre-increment: j value: %d, i value : %d \n",j,i);
return(0);
}
Output :
No comments:
Post a Comment