What is the difference between printf() and puts() in C?

前端 未结 10 2115
长发绾君心
长发绾君心 2020-12-07 07:27

I know you can print with printf() and puts(). I can also see that printf() allows you to interpolate variables and do formatting.

10条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 07:44

    When comparing puts() and printf(), even though their memory consumption is almost the same, puts() takes more time compared to printf().

提交回复
热议问题