Write a program to find the size of variables. | Basic Programming of c | c programming | dev c++

  Basic Programming of c 



List of Experiments 

Write a program to find the size of variables.

-----------------------------------------------------------------------------------

#include<stdio.h>

int main()

{

int intType;

long int longType;

float floatType;

double doubleType;

char charType;

printf("int: %zu \n", sizeof(intType));

printf("float: %zu \n", sizeof(floatType));

printf("double: %zu \n", sizeof(doubleType));

printf("char: %zu", sizeof(charType));

}


-----------------------------------------------------------------------------------

Result



Copy code from here:-