Update 20220510 How to (safely) read user input with the getline function.md

修改格式
This commit is contained in:
六开箱 2022-05-10 16:08:49 +08:00 committed by GitHub
parent f4d3f074d2
commit 97ee76a6bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,10 +26,9 @@ As a simple example, we might ask the user a question and read the result into a
#include <stdio.h>
#include <string.h>
int
main()
int main()
{
  char city[10];                       // Such as "Chicago"
  char city[10]; // Such as "Chicago"
  // this is bad .. please don't use gets