passing variable number of arguments

后端 未结 5 1282
野性不改
野性不改 2020-12-07 01:31

Can we pass variable number of arguments to a function in c?

5条回答
  •  情书的邮戳
    2020-12-07 02:02

    make sure that the variable argument list should always be at the end of the argument list

    example: void func(float a, int b, ...) is correct

    but void func(float a, ..., int b) is not valid

提交回复
热议问题