ข้ามไปที่เนื้อหาหลัก

Fix scanf function skip some statement problem in linux

It can fix by append getchar(); after the scanf line

example
                         char name[20];
                         printf("Please enter your name : ");
                         scanf("%s",name);
                         getchar();

ความคิดเห็น