Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

show the sizes of C data types

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 README
Octocat-spinner-32 main.c
Octocat-spinner-32 makefile
README
$ make
gcc main.c -o type_sizes
$ file type_sizes
type_sizes: Mach-O 64-bit executable x86_64
$ ./type_sizes
size of char: 1
size of int: 4
size of long int: 8
size of float: 4
size of double: 8
size of struct with one element: char: 1
size of struct with two elements: char + int: 8

size of pointer to char: 8
size of pointer to int: 8
size of pointer to float: 8
size of pointer to double: 8
size of pointer of struct with one element: char: 8
size of pointer of struct with two elements char + int: 8
Something went wrong with that request. Please try again.