I'm wondering if it is possible to save a signed char into a scanf function
/* Program to scan in a negative char */
#include <stdio.h>
int main (){
signed char myChar;/* trying to save a char as a signed value */
printf("Enter a signed char: ");
scanf("%c", &myChar ); /*main part of the code to scan in a signed char */
printf("You entered: %c \n", myChar); /*returns a signed char*/
return 0;
}
You need to use different format:
https://godbolt.org/z/f1785qbvK