1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>

// RIGHT VERSION

#define  print_joke()                                     \
    do {                                                  \
        printf("What do you cheese that's not yours?\n"); \
        printf("Somebody else's cheese");                 \
    } while(false)

#define  print_riddle() \
    do {                \
        printf("…");    \
        printf("…");    \
    } while(false)

// Put backslash at the end of a line to continue with the next line.
// Do not put a backslash at the end of the last line.
// HW07: Include at least one blank line before/after a #define macro definition.

// NOTE:  No semicolon at the end of a #define

int main(int argc, char* argv[]) {
    
    // The following is PROHIBITED by our code quality standard, even though it is valid C.
    if(3 == 1)
        printf("3 != 1\n");
    else
        print_joke() ;

    return EXIT_SUCCESS;
}
/* vim: set tabstop=4 shiftwidth=4 fileencoding=utf-8 noexpandtab: */

© Copyright 2022 Alexander J. Quinn         This content is protected and may not be shared, uploaded, or distributed.