Why doesn't this work? If you run it you'll see the odd output. at first it asks me like normal then i put in a then it says enter letter 2 enter letter 3 on the same line and it doest it to the end. then it skips the last for and doesnt print them.
Code:#include <stdio.h> int main(void) { char alphabet[26],letters; int i; for(i=1; i<=26; i++) { printf("Enter letter %d of the alphabet: ", i); scanf("%c", &alphabet[letters]); } for(i=1; i<=26; i++) printf("%c", alphabet[letters]); return 0; }