1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
// TEST FILE

// Okay to copy/adapt anything in this file for Spring 2021.  You are
// responsible for ensuring that it is correct.

#include <stdio.h>
#include <stdlib.h>
#include <print_integer.h>

int main(int argc, const char* argv[]) {
    // Test 0:  empty test
    
    // Test 1:  zero in base 10 -- fixed output for one particular input
    print_integer(0, 10, "");
    fputc("\n", stdout);

    // Test 2: two in base 10 -- single digit non-negative number in base ≤10 with no prefix
    print_integer(2, 10, "");
    fputc('\n', stdout);  // '\n' is a newline character.

    return EXIT_SUCCESS;
}

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