Driver to test functions of radix.c (do not modify) More...
Functions | |
int | main (int argc, char *argv[]) |
This is a driver program to test the functions defined in radix.h and implemented in radix.c. The program takes two or three command line parameters, calls one of the functions, then prints the results. To see how to use the program, execute testRadix
in a terminal window. This will print a usage statement describing how to run the program. The first parameter of the program is always a key specifying the function to run. Options are:
The 2nd parameter is always the radix you work in (2..36). The first two functions, c2i, and i2c whose input is a single character or a single integer, take a 3rd parameter. It will be either a number (base 10) when you are converting an number to a character/characters. It will be one character when converting a digit to a number.
A sample execution might be: testRadix c2i 16 A
All values may be entered as unsigned decimal numbers
int main | ( | int | argc, |
char * | argv[] | ||
) |
Entry point of the program
[You | don't need to worry about this right now] argc count of arguments, will always be at least 1 |
argv | array of parameters to program argv[0] is the name of the program, so additional parameters will begin at index 1. |