#include <stdio.h>
#include <stdlib.h>
//A simple program that asks for an integer and prints it back out.
int main()
{
    int a; 
    printf("Type an integer: ");
    scanf("%d",&a);
    printf("The integer you typed is: %d",a);
}
If the user types in a character such as X then the output will always be a 64 for some reason. Why does this happen? 
 
    