Show Bid Request
|
Description:
Write a C program (unix) to demonstrate passing parameters to the main function.
This project will test your ability to create related functions to perform parts of the same task. In addition it will expand the parameter passing concepts to now include the main function.
NOTE: Do not use any screen clear or other cursor manipulation calls in your code. Do no prompt the user or read any input from the keyboard.
It is absolutely imperative that the following be used in the code. MUST use: void main(int argc, char **argv); int hexnum(char *s); int hexdigit(char c); void usage(int c); A POW function must also be used to determine conversion.!! Given: A hexadecimal number passed on the command line.
You will need:
A function to convert individual hex digits (ie, hexdigit). A function to convert the whole number (ie, hexnum). A function to display errors and exit (ie, usage).
Perform the following: (In no particular order)
1) Check for the appropriate number of parameters (too many or not enough). If not, display error message. Use MAIN to determine this (counts arguments).
2) Convert the hex number to decimal: Please use SWITCH STATEMENTS with hexdigit to perform this.
3) Trap for bad hex digits. Is it a valid hexidecimal digit? If not, display error message. Use hexnum (default -1) to determine.
4) Display the original number and its converted value or error.
5) Please clearly comment the code. Thank you.
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
Special Conditions / Other:
As soon as possible
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$20 (USD)
|
Nov 20, 2001 8:11:09 PM EDT
|
10
(Excellent)
|
|
|
Simple project can be done in less than an hour. |
|
|
|
|
|