Wednesday, 1 April 2015

c progaram to display the size of a data type

write a progaram to display the size of a data type
/* c  progaram to display the size of a data type */
/* author: sai      date:1-4-2015  */

# include <stdio.h>
int main()
{
   printf("size of short Int %d\n",sizeof(short int));
   printf("size of long Int %d\n",sizeof(long int));
   printf("size of float %d\n",sizeof(float));
   printf("size of double %d\n",sizeof(double));
   printf("size of char %d\n",sizeof(char));
}

output


No comments:

Post a Comment