I have a simple code that converts a char into an loop while , but when I run and put the first char , the program goes into loop infinity, here goes the code:
#include <stdio.h>
int main()
{
char c;
while (1)
{
printf("Enter a character: ");
if (scanf("%c", &c) == 0)
printf("Err");
printf("The numeric form of %c is %d\n", c, c);
}
return 0;
}