Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

Preprocessor, const, static, and enum · ⁨พรีโปรเซสเซอร์, const, static และ enum⁩

English

What runs before the compiler

  • Before the compiler sees your code, the preprocessor handles every line that starts with #.
  • It pastes in headers, replaces macros, and removes comments — a simple text step.
  • You have used it already: #include <stdio.h> is a preprocessor command.

ไทย

ก่อนที่ compiler จะเห็นโค้ดของคุณ

  • ก่อนที่ compiler จะเห็นโค้ดของคุณ preprocessor จะจัดการกับทุกบรรทัดที่ขึ้นต้นด้วย #
  • มันใส่ headers เข้าไป เปลี่ยน macros และลบ comments — เป็นขั้นตอนข้อความธรรมดาๆ
  • คุณเคยใช้มันไปแล้ว: #include <stdio.h> เป็นคำสั่ง preprocessor

The preprocessor expands #include and #define into plain code, then the compiler runs

Handout · ⁨เอกสารประกอบการเรียน⁩

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP