#include <stdio.h>
int main()
{
printf(“Size of int = %zu bytes\n”, sizeof(int));
printf(“Size of float = %zu bytes\n”, sizeof(float));
printf(“Size of double = %zu bytes\n”, sizeof(double));
printf(“Size of char = %zu byte\n”, sizeof(char));
return 0;
}
sizeof(int) → Finds the memory size occupied by an int.sizeof(float) → Finds the memory size occupied by a float.sizeof(double) → Finds the memory size occupied by a double.sizeof(char) → Finds the memory size occupied by a char.sizeof() is an operator in C used to determine the size of a data type or variable in bytes.This website uses cookies.