Hot answers tagged

1 vote
Accepted

pset2 ceasar ( why does it keeps showing " expected "ciphertext: yx...", not "ciphertext: yx..."

The main problem is this: printf( " \n "); The spec says to print a line feed after the encrypted code. This prints an extra space before and after the line feed. One of the hidden ...
user avatar
  • 64.1k
1 vote

pset2 (ceasar) - isdigit function not working correctly returns "expected expression" error

It seems correct because it is. The 'expected expression' error is almost always because of misplaced, missing or extra curly braces or parentheses. Is it possible that you're editing one version of ...
user avatar
  • 64.1k
1 vote
Accepted

Please help me, validating the key in this Caesar problem

In isdigit(*argv[1]), *argv[1] is same as argv[1][0] (array[i] is same as *(array + i)), so you check only the first character for being a digit. You'd have to check all individual characters (can ...
user avatar
  • 20.7k
1 vote
Accepted

Pset2 Cesar- Question on Converting Strings

Let argv[1] = "1" then atoi(argv[1]) == 1 (int) argv[1][0] == 49 (ASCII code of '1')
user avatar
  • 1,139
1 vote

Problem with ceasar

Start with this short on Variables and Scope. You can only use variables in the scope in which they have been declared. For instance, key is declared in main, so you cannot access it, it does not ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible