Well, one way to determine whether a
string contains any non-alphabetical
chars is to iterate over the
chars of this
string character by character, checking whether this character is an alphabetical character using a function like
isalpha() receives a
char as an argument (not a whole
true in case it's an alphabetical
The pseudocode for this might be something like
for (int i = 0 to i = the length of the string - 1, increment i by 1)
if the current character in the string in an not an alphabetical char
print an appropriate error message
Given that a
string is just an array of
chars, you can access a
char within a
string using the bracket notation. For example
string s = "hello";
printf("%c\n", s); // prints the 'h'
printf("%c\n", s); // prints the 'l'
printf("%c\n", s); // prints the 'o'
argv is an array of
argv[x] accesses the x th
string in that array and
argv[x][y] accesses the y th
char in the x th
string in that array.