Skip to content

Commit

Permalink
preprocessor_all
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWatcher01 committed Nov 10, 2023
1 parent 15cbb15 commit 7e47a42
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions preprocessor/2-main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <stdio.h>

/**
* main - entry point
*
* Return: 0 if success
*/

int main(void)
{
printf("%s\n", __FILE__);
return (0);
}
6 changes: 6 additions & 0 deletions preprocessor/3-function_like_macro.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef FUNCTION_LIKE_MACRO_H
#define FUNCTION_LIKE_MACRO_H

#define ABS(x) ((x) < 0 ? -(x) : (x))

#endif
6 changes: 6 additions & 0 deletions preprocessor/4-sum.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef SUM_MACRO_H
#define SUM_MACRO_H

#define SUM(x, y) ((x) + (y))

#endif

0 comments on commit 7e47a42

Please sign in to comment.