Question: Write a C program, convert2tenandhex.c that takes one command line parameter. The parameter is an integer either in decimal or hexadecimal. If it is in

Write a C program, convert2tenandhex.c that takes one command line parameter. The parameter is an integer either in decimal or hexadecimal. If it is in hexadecimal, it starts with a leading 0x. The program outputs exactly 2 lines. The first line contains only your name. If the program has exactly one command line parameters, the second line contains two tokens separated by a single blank. The first token is the value of the parameter in decimal and the second token is the value of the parameter in hexadecimal (without the leading 0x). If the number of command line parameters is not correct, the second line is an appropriate error message. Run the program three times, once with no command line parameters, once with your student ID and once with its hexadecimal equivalent (with he leading 0x). Put both the input and output for the three runs in a file called assign 1-3.out. Make sure each run is clearly labeled. You may assume that the value specified on the command line will fit in an int
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
