Question: (C Program) I need help on an assignment where i must take an input from the command line in the format cmd1,cmd2,cmd3,cmd4. Where each command

(C Program) I need help on an assignment where i must take an input from the command line in the format cmd1,cmd2,cmd3,cmd4. Where each command is seperated by a comma. How can i accomplish this? is there a way where i can the entire line as a string and then parse it? To explain further, the user executes the program like this after compiling: ./a.out cmd1,cmd2,cmd3,cmd4.... (number of cammands not limited) If there is a way to take the argument as a single string that would be best, as I can just parse the commands in the program.

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 Databases Questions!