3
votes
Accepted
Vigenere Segmentation understanding
This is a very, very common error for new programmers. The problem is the actual call to isalpha(). The isalpha() function takes a single char as input, but argv[1] is a string, not a char. Simply ...
2
votes
Accepted
What is the return value when isalpha() evaluates to true?
The problem is a lack of understanding of how many of these functions work. While you would think that isalpha() would return a bool, it doesn't. Instead, it returns a number. If it is false, it ...
1
vote
Accepted
Pset2, caesar: string characters not working with is alpha logic?
The problem is surely in the return value of the isalpha function and the value of true, for what the condition is true both values must be equal, which apparently does not happen, keep in mind that ...
1
vote
Accepted
C: Trouble with isalpha and char* - Error: expected expression
I guess you mean if (isalpha(word[i])), with word being a char[] or char*, and i being something like an int? Could you maybe clarify your question by adding the surrounding code to your question?
1
vote
Accepted
Isalpha not working for all char of my string
There are a couple issues here.
First, there's a known issue with debug50. For certain library functions, if you "step into" the line of code with the function call, debug50 will try to step ...
1
vote
Isalpha not working
Without seeing how you're using it, there's no way to answer.
However, note that isalpha, isupper, islower, etc., can ONLY look at one character. If you pass it a string, like argv[1], it will result ...
1
vote
Accepted
pset2 substitution - isalpha doesn't seem to recognize letters
You've run into a common newbie problem. The issue lies in this code:
if ( isalpha ( c ) != 'true' )
The issue is with the return value of isalpha and what you're comparing it to. Let's handle ...
1
vote
pset2 substitution - isalpha doesn't seem to recognize letters
I am not a Pro, too, but the first thing I see is the "isalpha(c) != "true" -> When I recall this pset correctly, isalpha() does not return "false" or "true" but 0 or 1.
But if the statement would be ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
isalpha × 16pset2 × 6
vigenere × 4
segmentation-fault × 2
string × 2
for-loop × 2
c × 1
python × 1
readability × 1
pset2-substitution × 1
char × 1
substitution × 1
isdigit × 1
conditions × 1
boolean × 1
logic × 1
ascii × 1