I have a very simple code to convert Upper case to lower case:
#include <stdio.h>
int main()
{
char c;
int i=0;
for (i=0;i<10;i++){
c=getchar();
c=c-'A'+'a';
printf("%c\n",c );
}
return 0;
}
But running this simple code always I have an additional *
character at output. It prints the char following by a *
. Take a look:
D
d
*
D
d
*
E
e
*
Where does this come from?