Ok, in my vain attempt to learn up on strings before my exams I made this program to better understand getchar().
The problem is the outputs are always smiley faces?? What's going on?Code:#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { int c; int i = 0; int d; char storage[100]; printf("Input a phrase: "); while(c = getchar() != '\n'){ storage[i++] = c; } printf("\n\nEchoing: \n"); for(d = 0; d < i; d++) printf("%c ",storage[d]); return 0; }