printf("The value for Erase is %s\n",term.c_cc[ERASE]);
should be printf("The value for Erase is %d\n",term.c_cc[VERASE]);
, see termios(3) for further details.
The symbolic index for Erase character is VERASE
; the type of c_cc[VERASE]
is cc_t
, in my system, cc_t
is unsigned char
, so it should be printed with %c
or %d
.