Hi, Im fairly new to programming with C and was wondering if anyone could tell me whats wrong with this code:
and output:Code:#include <stdio.h>
main() {
char input;
char h[200];
char b[200];
printf("enter input: ");
scanf("s", input);
switch (input) {
case "h":
printf("hi!\n");
break;
case "b":
printf("bye\n");
break;
default:
printf("incorrect input\n");
break;
}
}
Thanks for reading.Code:switch.c:12: error: case label does not reduce to an integer constant
switch.c:15: error: case label does not reduce to an integer constant