0

the code compiles well ,, but an error ocures enter image description here

enter image description here

0
2

Your problem is isalpha(argv[1]) isalpha takes a single character as input. argv[1] is a string of multiple characters, not a character. You cannot apply isalpha to an entire string. It causes a seg fault.

If this answers your question, please accept this answer to remove the question from the unanswered question pool. Let's keep up on forum housekeeping. ;-)

2
  • would you be able to apply isalpha to something like argv[1][i], pinpointing the i'th character in argv[1]? @cliff – Rachel Zanzie May 15 '17 at 22:17
  • Not only can you, but you should. Also, think "for loop" ;-) – Cliff B May 15 '17 at 22:23

Not the answer you're looking for? Browse other questions tagged .