In this project, I learned about common predefined macros in C while practicing implementing my own and include-guarding header files.
- tests: Folder of test files. Provided by Holberton School.
-
0. Object-like Macro
- 0-object_like_macro.h: Header file that defines a
macro named
SIZEas an abbreviation for the token1024.
- 0-object_like_macro.h: Header file that defines a
macro named
-
1. Pi
- 1-pi.h: Header file that defines a macro named
PIas an abbreviation for the token3.14159265359.
- 1-pi.h: Header file that defines a macro named
-
2. File name
- 2-main.c: C program that prints the name of the file it was compiled from followed by a new line.
-
3. Function-like macro
- 3-function_like_macro.h: Header file that defines a
function-like macro
ABS(x)that computes the absolute value of a numberx.
- 3-function_like_macro.h: Header file that defines a
function-like macro
-
4. SUM
- 4-sum.h: Header file that defines a function-like macro
SUM(x, y)that computes the sum of the numbersxandy.
- 4-sum.h: Header file that defines a function-like macro