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.

العربية

ما يحدث قبل المترجم

  • قبل أن يرى المترجم كودك، يتعامل المعالج المسبق مع كل سطر يبدأ بـ #.
  • يلصق العناوين، ويستبدل التعريفات، ويحذف التعليقات — خطوة نصية بسيطة.
  • لقد استخدمته بالفعل: #include <stdio.h> هو أمر لمعالج مسبق.

يقوم المعالج المسبق بتوسيع #include و #define إلى كود عادي، ثم يعمل المترجم

Handout · ⁨ورقة عمل⁩

Log in or create account · ⁨تسجيل الدخول أو إنشاء حساب⁩

IGCSE, A-Level & AP