Write a C program to perform the following. Read the name of an ftp command, identify whether
Question:
Write a C program to perform the following. Read the name of an ftp command, identify whether it is a valid command or not and print a line indicating the command is valid or invalid.
The list of valid ftp command to use for this question is: (1) ascii, (2) recv (and/or get), (3) send (and/or put), (4) rmdir, (5) mkdir, (6) pwd, (7) ls, (8) cd, (9) status and (10) quit.
The pseudo code is given below.
Step 1: Read an ftp command into a character array from keyboard using gets function or scanf.
Step 2: Identify what command it is using strcmp function.
Step 3: For valid ftp command print a line of output as: pwd is a valid ftp command
For invalid ftp command print a line of output as: xyz is not a valid ftp command
Display the content of source code file hw3q2.c.
Run the executable file which will produce output.
NOTE: You can run the program multiple times testing for valid ftp commands and one invalid command. Alternately, you can write a loop around Step 1 to 3 and loop until quit command is typed.
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall