Question: CSE 1 2 1 - - Introduction to C Extra Credit # 1 ( Worth 5 pts ) Due on last day of

CSE 121-- Introduction to "C"
Extra Credit #1(Worth 5 pts)
Due on last day of class at 11:59PM
Name your program: extra1.c
This assignment will introduce how to incorporate command_line arguments into your program. Until now, if we wanted our program to get data from a user, we had to ask the user for specific input and then capture that input with scanf(). In many cases, we would like the user to enter data at the same time they run the program. For example, when we use the "" command to submit our programs, we enter the program name (i.e.cp) along with the file to copy and where to copy it. For example:
cp p5.c /home/faculty/skoss/cse121/your_UID
So this assignment is about writing a little utility program called submit, which will make it easier for you to submit your weekly programs. After you create this utility, you can simply type ./submit, followed by your px.c, and it will be copied to your directory in my account.
For example, to submit p5.c you would type:
./submit p5.c
Below is the code for this utility. When you compile it, use the following command: gcc extra1.c -o submitTo learn more about the functions "sprintf()" or "system()", you can google or man_page them. sprintf() is declared in
CSE 1 2 1 - - Introduction to " C " Extra Credit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!