1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#include <stdio.h>

#define print_num(x) printf("The value of %s is %d\n", #x, (x));
#define print_square(x) printf("The square of %s is %d\n", #x, (x) * (x));

int main(int argc, char *argv[]) {
    int a = 3;
    print_num(a)
    print_square(3 + 3);

    //printf("The value of %s is %d\n", "a", (3));
    return 0;
}

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