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 up to 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:
int2char()
) char2int()
) divRem()
function ascii2int()
) int2ascii()
) frac2double()
) The 2nd parameter is always the radix you work in (2..36). The 3rd parameter depends on the function.
A sample execution might be: testConv c2i 16 A
All numbers are unsigned.
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. |