that will be fine but why is scanf taking the input as a string? as is specified by %c it should take only one character input and a space or enter should end the input.
I don't know precisely the inner workings of io streams, so you may want to ask someone more qualified or do more research.
AFAIK when you hit enter anything you wrote is copied into a buffer and scanf/cin read stuff from that buffer.
The "%c" format string is telling scanf to read a single character from the buffer, but anything else is left there ready to be read.
When the buffer is empty, scanf will pause the program waiting for a newline character to write to the buffer and resume reading.
A space is not a newline so it won't unblock the program.