Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and works. Contact: aviboots(AT)netvision.net.il
BlueHost Web Hosting

Bonsai Boy of New York Bonsai Trees and Accessories

Liquid Web iThemes WordPress Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

DreamHost Web Hosting


getResponse autofunnels

Liquid Web Cloud VPS Hosting

11,818 questions

16,089 answers

573 users

How to find the size of int, long, char, float and double in C

1 Answer

0 votes
#include <stdio.h> 

int main(void) 
{ 
    int i;
	long l;
    char ch; 
    float f; 
    double d; 
  
    printf("Size of int = %d\n", (int)sizeof(i)); 
	printf("Size of long = %d\n", (int)sizeof(l)); 
    printf("Size of char = %d\n", (int)sizeof(ch)); 
    printf("Size of float = %d\n", (int)sizeof(f)); 
    printf("Size of double = %d\n", (int)sizeof(d)); 
     
    return 0; 
} 
   
   
   
/*
run:
   
Size of int = 4
Size of long = 4
Size of char = 1
Size of float = 4
Size of double = 8
 
*/

 




answered Aug 11 by avibootz
...