Wednesday, 5 November 2014

How to find the sizeof Data type and Display in Decemial,Octal and HexaDecimal format in C

void main() { int i; float r; printf("welcome to kmit\n"); printf("welcome to Telengana\n"); i=15; //i=35.756; r=105643.7564; printf("%d\n",i); printf("%0.4f\n",r); printf("%d\n",sizeof(i)); printf("%d\n",sizeof(r)); printf("%d\n",i);//display in decimal printf("%o\n",i);//display in Octal printf("%0x\n",i);//display in Hexadecimal }

No comments:

Post a Comment