The "Hello, World!" program is a classic first step for anyone learning to code in C. You write a few lines, compile them, and see your message on the screen. It is a simple and satisfying start. But if you inspect the compiled program on a Linux system, you will find a small surprise. The executable file is thousands of bytes large. Why does a program with a single instruction to print text need all that space?

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Why Is My “Hello World” So Big?

  • Mohit Mishra

摘要

The "Hello, World!" program is a classic first step for anyone learning to code in C. You write a few lines, compile them, and see your message on the screen. It is a simple and satisfying start. But if you inspect the compiled program on a Linux system, you will find a small surprise. The executable file is thousands of bytes large. Why does a program with a single instruction to print text need all that space?