We check the string validity when we use the get_string() function. Example: if (p != NULL) Are we also supposed to check string validity when the string is entered as a command line argument?
If you're using command-line arguments, always test
argc before you use
argv, as otherwise you might access an array element that's not there.
Obviously, you cannot repeat input of a command-line argument using a do-while loop.
If you are on vigenere, you must reject password strings not entirely alphabetic, as that's part of the specification.
In most cases, the specification should tell you how to handle command line arguments. Otherwise, try to make it so your programme will behave in some reasonable way (a strange file name might not be a problem if the failing of fopen is handled appropriately, but it might be a problem if you give access to files the user should not be able to access)