I am new with C
i have some problem
how can i check a string input by the user is all letters ( A to Z)
i know just using switch case which i have to declare each single of them a.b.c...z i think
any advice?
Thanks
I am new with C
i have some problem
how can i check a string input by the user is all letters ( A to Z)
i know just using switch case which i have to declare each single of them a.b.c...z i think
any advice?
Thanks
If S is a string and s0 is the first character and sn the last character, then create a loop whose counter i runs from 0 to n. For each si check if it is a character of the alphabet. Checking if a character is an character of the alphabet can be done by checking if the character is in the range 'A'..'Z' or with the function isalpha(). But the function isalpha() also checks if the character is in the range 'a'..'z'.