#include <stdio.h>
main()
{
double d1 = 1234.56;
int i1=456;
printf("the value of d1 as int without cast operator %d\n",d1);
printf("the value of d1 as int with cast operator %d\n",(int)d1);
printf("the value of i1 as double without cast operator %f\n",i1);
printf("the value of i1 as double with cast operator %f\n",(double)i1);
i1 = 10;
printf("effect of multiple unary operator %f\n",(double)++i1);
i1 = 10;
printf("effect of multiple unary operator %f\n",(double)- ++i1);
i1 = 10;
printf("effect of multiple unary operator %f\n",(double)- -i1);
i1 = 10;
printf("effect of multiple unary operator %f\n",(double)-i1++);
}
|