I've been trying to break it down into parts but I can't figure out why I keep having a segmentation fault. I've watched the lecture but I can't figure out where to put the breakpoint to find it. Im almost certain it has something to do with the first if statement as it doesn't prompt the user. Any help would be very much appreciated.
The seg fault is here:
The isalpha function and all of its cousins take a single char as input. argv is a string, not a single char. When you try to ram a string down it's throat, it chokes and throws an error.
As for seg fault diagnosis, you may find this useful:
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)