代码之家  ›  专栏  ›  技术社区  ›  doron

分配和比较

c c++
  •  4
  • doron  · 技术社区  · 14 年前

    查看代码:

    int i = 5;
    if (i = 0)
    {
      printf ("Got here\n");
    }
    

    C标准对将要打印的内容有何规定? 或者更一般地说,任务是先完成还是比较?

    9 回复  |  直到 14 年前
        1
  •  10
  •   dreamlax    14 年前

    if

    if ( expression ) statement

    statement i = 0

        2
  •  5
  •   iniju    14 年前

        3
  •  3
  •   Steve Townsend    14 年前

    i=0

        4
  •  2
  •   Philip Starhill    14 年前

    i = 0 0

        5
  •  2
  •   R.. GitHub STOP HELPING ICE    14 年前

    i=0

        6
  •  1
  •   Ignacio Vazquez-Abrams    14 年前

        7
  •  0
  •   nos    14 年前

        8
  •  0
  •   schnaader    14 年前

    if (i = -1)

        9
  •  0
  •   Babak Naffas    14 年前