Skip to content

Instantly share code, notes, and snippets.

@sebbekarlsson
Created August 1, 2019 20:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebbekarlsson/88cef418e1c2d468534af5ee08f648f6 to your computer and use it in GitHub Desktop.
Save sebbekarlsson/88cef418e1c2d468534af5ee08f648f6 to your computer and use it in GitHub Desktop.
C vs CPP, binary size

hello_cpp_cout:

#include <iostream>
int main()
{
    std::cout << "Hello world" << std::endl;
    return 0;
}

Size: 14,924 bytes

hello_c:

#include <stdio.h>
int main()
{
    printf("hello world\n");
    return 0;
}

Size: 8,456 bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment