Advertisement
nguyenvanquan7826

size of type

Feb 16th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main()
  4. {
  5.     printf ("char size = %d byte \n", sizeof(char));
  6.     printf ("short size = %d byte \n", sizeof(short));
  7.     printf ("int size = %d byte \n", sizeof(int));
  8.     printf ("long size = %d byte \n", sizeof(long));
  9.     printf ("float size = %d byte \n", sizeof(float));
  10.     printf ("double size = %d byte \n", sizeof(double));
  11.     printf ("1.55 size = %d byte \n", sizeof(1.55));
  12.     printf ("HELLO size = %d byte \n", sizeof("HELLO"));
  13.  
  14.     system("pause");
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement