Program to find find size of int, float, double and char of your system in C

Source Code

// 7. Program to find find size of int, float, double and char of your system
// Arpan Das - CST 2nd Year (VOCLET)

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

void main () {
	//clrscr();
	//system("cls");
	
	printf("\t\t..:: find size of int, float, double and char ::..\n\n");
	printf("\nSize of int \t= %ld byte(s)", sizeof(int));
	printf("\nSize of float \t= %ld byte(s)", sizeof(float));
	printf("\nSize of double \t= %ld byte(s)", sizeof(double));
	printf("\nSize of char \t= %ld byte(s)", sizeof(char));
	
	//getch();
}

Output

		..:: find size of int, float, double and char ::..


Size of int 	= 4 byte(s)
Size of float 	= 4 byte(s)
Size of double 	= 8 byte(s)
Size of char 	= 1 byte(s)

Leave a Reply

Note: Your email address will not be published. Required fields are marked *