passing variable number of arguments

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

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

5条回答
  •  春和景丽
    2020-12-07 01:47

    Yes, if the function accepts variable arguments. If you need to make your own variable-argument function, there are macros that begin with va_ which give you access to the arguments.

提交回复
热议问题