What are the major differences between ANSI C and K&R C?

后端 未结 11 1467
不知归路
不知归路 2020-11-29 04:10

The Wikipedia article on ANSI C says:

One of the aims of the ANSI C standardization process was to produce a superset of K&R C (the first publishe

11条回答
  •  佛祖请我去吃肉
    2020-11-29 04:28

    Another difference is that function return types and parameter types did not need to be defined. They would be assumed to be ints.

    f(x)
    {
        return x + 1;
    }
    

    and

    int f(x)
    int x;
    {
        return x + 1;
    }
    

    are identical.

提交回复
热议问题