Print Size of Different Data Types – C Program

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

//C Program to Display Size of Different Datatypes - FScOnline.info

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));
  
  getch();
  return 0;
}

 Output

c-program-to-print-ascii-of-a-character

Categories: C Language,C Programs,Computer Science

Tags: ,

Leave A Reply

Your email address will not be published.

×