codegurukool.com · Free coding tutorials & online compiler

Home › C Tutorial › C data types

C data types

Sizes and formats.

char 1 byte, int usually 4, float 4, double 8. Use sizeof to check on your machine.

Example code

#include <stdio.h>
int main() {
  printf("%zu %zu %zu %zu\n", sizeof(char), sizeof(int), sizeof(float), sizeof(double));
  return 0;
}

Run this code in the online editor

← C variablesC type conversion →