putchar() vs printf() - Is there a difference?

后端 未结 5 1645
醉酒成梦
醉酒成梦 2020-12-16 14:50

I am currently in chapter 1.5.1 File copying and made a program like so:

#include 

/* copy input to output; 1st version */
main()
{
    int c         


        
5条回答
  •  死守一世寂寞
    2020-12-16 15:29

    printf lets you format strings in a complicated way, substituting things like integers and floats and other strings.

    getchar and putchar get and put characters

    I can say that printf is more useful in more ways compared to putchar.

    Better look in their respective manual pages ( man 3 printf man 3 putchar ) in terminal

提交回复
热议问题