y/n as only option in C
#include <stdio.h>
int main() {
printf("Are you sure to continue? y/n ");
char c;
scanf(" %c", &c);
switch (c) {
case 'y':
printf("program continues\n");
break;
case 'n':
printf("program stops\n");
break;
default:
printf("wrong option\n");
}
}