====== Covid HW 02 - Processing input data and computing statistics ====== Write a program that: * has to have at least one input argument passed on the command line, e.g. ./program_name first_argument * displays the first argument and also prints a selection menu to standard output, e.g. Welcome! The input parameter is "/dev/ttyACM0" == program menu == Item 1: Control LED Item 2: Read button state Item 3: Read joystick Item 4: Control display Item c: Enter a custom command Item e: Exit Selection: * then the program waits for user input. The program will react just on the allowed options and if wrong selection is made then it prints "Wrong option" to stderr * selections 1 to 4 will cause redraw of the menu * selection 'c' will allow the user to enter a string which will be printed to the standard output - see the example: Welcome! The input paramenter is "/dev/ttyACM0" == program menu == Item 1: Control LED Item 2: Read button state Item 3: Read joystick Item 4: Control display Item c: Enter a custom command Item e: Exit Selection: User input (keyboard) 'c' - '' denotes character Enter commnad: User input (keyboard) "*IDN?" - "" denotes string array The command is "*IDN?" == program menu == Item 1: Control LED Item 2: Read button state Item 3: Read joystick Item 4: Control display Item c: Enter a custom command Item e: Exit Selection: * the program will provide return value TRUE. * the program menu will be stored as a global variable as array of strings. * the actual number of menu items will be determined by sizeof macro. * the printing of the menu will be serviced by a subroutine which will return the selection (represented by ID ) to the calling function through a pointer variable passed as argument. * These parameters of the program will be evaluated: * 1 point - the menu global variable follows requirements. * 1 point - the program generates the menu in a loop - all items are working, there is a dedicated function for menu printing and menu selection is saved in a variable passed in as a pointer. * 1 point - the program exits with 'e' option properly * 1 point - the program takes an input parameter passed over the command line and prints it for **one time** before all menus * 1 point - the program is capable to read a custom command and print the command on the standard output