C function syntax, parameter types declared after parameter list

前端 未结 7 788
一个人的身影
一个人的身影 2020-11-22 12:34

I\'m relatively new to C. I\'ve come across a form of function syntax I\'ve never seen before, where the parameter types are defined after that parameter list. Can someone e

7条回答
  •  一整个雨季
    2020-11-22 13:00

    This is the so caller K&R style or old-style declaration.

    Note, that this declaration is significantly different from the modern declaration. K&R declaration does not introduce a prototype for the function, meaning that it doesn't expose the types of the parameters to the outside code.

提交回复
热议问题