My Project
|
Driver to test functions of numConv.c (do not modify) More...
Functions | |
int | main (int argc, char *argv[]) |
This is a driver program to test the functions defined in numConv.h and implemented in numConv.c. The program takes three command line parameters and calls one of the methods, then prints the results. To see how to use the program, execute ./testConv
in a terminal window. This will print a usage statement defining how to run the program. The 1st parameter of the program is always a key defining which function to run. The options are:
divRem()
function The 2nd parameter is always the radix you work in (2..36). The 3rd parameter will be either a number (base 10) when you are converting an number to a character/characters. It will be one/multiple characters when converting to a number.
A sample execution might be: testConv c2i 16 A
All numbers are be entered as unsigned integers
int main | ( | int | argc, |
char * | argv[] | ||
) |
Entry point of the program
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. |