Hacker Newsnew | comments | show | ask | jobs | submit login

Have you seen how big main(){} is? On my system it is 22,427 bytes. A simple printf("hello world\n"); Adds about 200 bytes bringing it up to 22,637. That adds all the functionality of printf, variadic arguments, everything prinf does that your version doesn't. There is a basic C runtime that goes with all C programs. Every programming language besides assembly does something similar. You could always run strip on the executable that knocks the printf version down to 8,192 bytes.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: