Skip to content

Latest commit

 

History

History

0x0C-preprocessor

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

0x0C. C - Preprocessor

About

An introductory project on:

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

Requirements

  • Ubuntu 14.04
  • gcc 4.8.4

File Descriptions

0-object_like_macro.h - defines a macro named SIZE as an abbreviation for the token 1024.

1-pi.h - defines a macro named PI as an abbreviation for the token 3.14159265359.

2-main.c - prints the name of the file it was compiled from, followed by a new line.

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

4-sum.h - function-like macro SUM(x, y) that computes the sum of the numbers x and y.