Precautions input format% c

% C format when read characters, space characters and escape character (including carriage return) are input as an active character;

There are three problems to solve are read when the space as a separator:

1. Use% ls

2. Use the getchar () function eaten spaces

Guess you like

Origin www.cnblogs.com/MashiroOvO/p/12623286.html