Skip to content

Latest commit

 

History

History

README.md

0x0D. C - Preprocessor 🧾

This directory contains a collection of C programs that demonstrate the use of the preprocessor directives and macros in C programming.

Task 0 - Define a Macro for Size 📏

File: 0-object_like_macro.h
📝 Description: Defines a macro named SIZE with the value 1024.


Task 1 - Define a Macro for Pi 🥧

File: 1-pi.h
📝 Description: Defines a macro named PI with the value 3.14159265359.


Task 2 - Print File Name 📄

File: 2-main.c
📝 Description: Writes a program that prints the name of the file it was compiled from, followed by a new line.


Task 3 - Define a Macro for Absolute Value (ABS) 📊

File: 3-function_like_macro.h
📝 Description: Defines a function-like macro ABS(x) that computes the absolute value of a number x.


Task 4 - Define a Macro for Sum (SUM) ➕

File: 4-sum.h
📝 Description: Defines a function-like macro SUM(x, y) that computes the sum of two numbers x and y.


Detailed Explanations 📑

For detailed explanations of each step and the commands used, you can refer to the commit descriptions in the directory's commit history. Each commit message contains a clear description of the actions taken, including the relevant commands used in the terminal.