Preprocessors

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Two Important Aspects of Preprocessor

- Preprocessor Directives - Macros

#ifdef #ifndef #else #endif

- These directives are used for conditional compilation - This directives allows certain code blocks to be included or excluded based on conditions

Preprocessor Directives

- begin with a # symbol - typically placed at the beginning of a line

Preprocessor

- modifies the sources code before compiled - provide instructions to the compiler

Preprocessor Directives

- special instruction that guide the preprocessor in modifying the source code

Macros

- symbolic names representing a constant value or code snippet - can simplify complex code, improve code readability, and allow for easy code modifications.

#include

- this directive is used to add external files or libraries into the source code - allows you to reuse code from other files

#define

- this directive is used to create macros

#pragma

- this directive is used to proved additional instructions to the compiler - compiler-specific - controls optimization settings, disable warnings, or include specific headers

#define MACRO_NAME value

Syntax for defining macro

#include <header_file>

Syntax of #include


Set pelajaran terkait

Chapter 1.2.4.1: Project and Development Life Cycles

View Set

EPS 601 Chapter 3 (Ethical Issues in Counseling practice, study guide)

View Set

Honan-Chapter 23: Nursing Management: Patients With Gastric and Duodenal Disorders

View Set

CHP 10: DNA Polymorphisms and Human Identification

View Set

IB Biology HL: Ecology & Conservation

View Set

Biology of Women (Disease & Immune) Review for Exam 2

View Set

Ch. 23 The Urinary System (Exam 4)

View Set