Scanf causes C program to crash May 18, 2023 by Tarik You must pass the address of the variable to scanf: scanf("%c", &answer);