Why does C's printf format string have both

前端 未结 11 619
孤城傲影
孤城傲影 2020-12-02 15:17

Why does C\'s printf format string have both %c and %s?

I know that %c represents a single character and %s repre

11条回答
  •  醉梦人生
    2020-12-02 15:59

    C has the %c and %s format specifiers because they handle different types.

    A char and a string are about as different as night and 1.

提交回复
热议问题