Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.08 KB

File metadata and controls

33 lines (23 loc) · 1.08 KB

0x0D. C - Preprocessor

Learning objectives for this project:

  • What are macros and how to use them
  • What are the most common predefined macros
  • How to include guard your header files

Tests ✔️

  • tests: Folder of test files. Provided by Holberton School.

Tasks 📃

  • 0. Object-like Macro

    • 0-object_like_macro.h: Header file that defines a macro named SIZE as an abbreviation for the token 1024.
  • 1. Pi

    • 1-pi.h: Header file that defines a macro named PI as an abbreviation for the token 3.14159265359.
  • 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 number x.
  • 4. SUM

    • 4-sum.h: Header file that defines a function-like macro SUM(x, y) that computes the sum of the numbers x and y.