This is because the newline character you entered at scanf("%d",&opt); is still ... scanf() reads the line until the newline occurs. gets() is just bad.
確定! 回上一頁