This is the correct code for you:
#include<stdio.h>
void main()
{char c;
while(c=getchar())
{
c=(c>='A'&&c<='Z')?(c+32):c;
printf("%c\n",c);
}
printf("%c\n",c);
}
>>while(c=getchar());
A big bug!
Anyway you input,aside of "Ctrl+C",you would not break from the loop.
Remember ascii rules may helps you a lot!
0-31:ascii control characters
32-47:usual signs
48-57:0-9
58-64:usual signs
65-90:A-Z
91-96:usual signs
97-122:a-z
123-126:usual signs
See,your code is not safe,fix it to include all conditions!