I have some code and I use getchar to read in some input from the user say a5
I have assigned
letter = getchar();
number = getchar();
so that putchar(letter) prints a
and putchar(number) prints 5
but when I try .... letter=letter - 'a';
I am trying to make this my zero index of array.(i should probably also have a minus one ther for zero indexing.)
putchar(letter) does not print anything??
I am basically trying to convert the letters into integers so I can use an array with input say [a].
Last edited by a moderator: