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

// TIP:  In a blank file, type "newc" (without quotes) and press Tab to make a skeleton program.
//       This is a snippet added for the course and not part of Vim itself.

int main(int argc, char* argv[]) {
    
    //int n = 0x6f;    
    //int n = 0x60 + 0x0f; // 6 x 16 + 15 x 1
    //int n = 0x60 + 017;  // 6 x 16 + (1 x 8 + 7 x 1)
    int n = 96 + 017;      // 6 x 16 + (1 x 8 + 7 x 1)

    // Again:  n does not have a number base.  It can be "expressed" in a number base of our choice.

    printf("n == %d (expressed in base 10)\n", n);
    

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

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