Why does following program produce two output message at the same time, without asking for any input from the user???
#include <stdio.h>
#include <ctype.h>
int main(void) 
{
    char input;
    do {
        printf("Enter a single character: \n");
    scanf("%c", &input);
        printf("The ordinal value is %d. \n",input);    
        } while(input != '#'); 
    return 0;
}
The output is followings:
Enter a single character:
s
The ordinal value is 115.
Enter a single character:
The ordinal value is 10.
Enter a single character:
 
     
    