Related blog posts: C++'s get and getline exploration
putchar、getchar
Example 1:
Example 2:
Example 3:
puts
Example 4:
gets
Gets does not stop typing until it encounters a carriage return, and spaces are also entered as characters , but remember, do not enter characters that exceed the given space size. In the case of not crossing the boundary, gets will automatically append'\0' to the end of the string>
Example 5:
Example 6: