Question: ****Make Sure to use atoi() to convert the string to integer Write a function that accepts an input command and extracts the command and its

****Make Sure to use atoi() to convert the string to integer****Make Sure to use atoi() to convert the string to integer Write

Write a function that accepts an input command and extracts the command and its parameter. Based on the prototype below, cmd and params variables will have the command and parameter, respectively. Display command and parameter in the main function Input: Move 100 Command: Move Parameter: 100 #include #include #include void my func (char *strl,char *cmd, int *params) void main (void) [ char str [20]={}; r0119 char command [10] ; int parameter; printf ("Enter command and parameters"); gets (str); my func (str, command, &parameter); ) //End main void my_func (char *strl,char *cmd, int *params) i ) //End my func

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!