search

Home  >  Q&A  >  body text

c++ - 为什么这段C代码执行之后结果为1245?

PHPzPHPz2773 days ago409

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 14:43:42

    First, 1, 2, 3 are the values ​​of c1, c2, and c3 respectively, then enter is the value of c4, and then 4, 5 are the values ​​​​of c5, c6, so the output is 1, 2, 4, 5

    You can output c4 in integer format and find that it corresponds to ASCII 10

    Don’t write code like this. .

    reply
    0
  • 迷茫

    迷茫2017-04-17 14:43:42

    Scanf input characters will read carriage returns, spaces, and tabs, but input strings will be ignored.

    reply
    0
  • Cancelreply