1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char* argv[]) {

    char c = '0';
    printf("c == '%c'  using %%c\n", c);  // "%%" means to print an actual %
    printf("c ==  %d   using %%d\n", '0');
    printf("c ==  %d   using %%d\n",  48);

    char d = '$';
    printf("d == '%c'  using %%c\n",   d);
    printf("d ==  %d   using %%d\n",  36);
    printf("d ==  %d   using %%d\n", '$');
    


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

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