I\'m trying to read a character from the console (inside a while loop). But it reads more than once.
Input:
a
Output:
you can do like this.
char *ar; int i=0; char c; while((c=getchar()!=EOF) ar[i++]=c; ar[i]='\0';
in this way ,you create a string,but actually it's a char array.