My Project
Functions
testConv.c File Reference

Driver to test functions of numConv.c (do not modify) More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "numconv.h"

Functions

int main (int argc, char *argv[])
 

Detailed Description

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:

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

Author
Fritz Sieker

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Entry point of the program

Parameters
argccount of arguments, will always be at least 1
argvarray of parameters to program argv[0] is the name of the program, so additional parameters will begin at index 1.
Returns
0 the Linux convention for success.