Print Size of Different Data Types – C Program

#include <stdio.h>
#include <conio.h>

//C Program to Display Size of Different Datatypes -

int main()
  printf("Type\t\t\tSize (bytes)");
  printf("\nCharacter\t\t    %d" ,sizeof(char));
  printf("\nInteger\t\t\t    %d" ,sizeof(int));
  printf("\nLong in\t\t\t    %d" ,sizeof(long int));
  printf("\nFloa\t\t\t    %d" ,sizeof(float));
  printf("\nDouble\t\t\t    %d" ,sizeof(double));
  printf("\nLong double\t\t    %d" ,sizeof(long double));
  return 0;



You might also like
Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More