Added book examples

This commit is contained in:
Louise Brown
2022-04-08 16:12:38 +01:00
parent 5b205092a7
commit 1c0a9e7b6a
59 changed files with 1381 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#include <stdio.h>
#include <conio.h>
#define DEBUG_ON 1
int main(void)
{
#if DEBUG_ON == 1
printf("Debug mode - about to do something\n");
#else
print("Running in standard mode");
#endif
return 0;
}

View File

@@ -0,0 +1,15 @@
#include <stdio.h>
#include <conio.h>
#define DEBUG_ON 1
int main(void)
{
#ifdef DEBUG_ON
printf("Debug mode - about to do something\n");
#else
print("Running in standard mode");
#endif
return 0;
}

View File

@@ -0,0 +1,8 @@
#include <stdio.h>
#define MIN(a,b) ((a)<(b)?(a):(b))
int main(void)
{
printf("The minimum value of 10 and 20 is: %d\n", MIN(10,20));
return 0;
}