What are scanf(“%*s”) and scanf(“%*d”) format identifiers?

前端 未结 5 548
太阳男子
太阳男子 2020-11-30 21:26

What is the practical use of the formats \"%*\" in scanf(). If this format exists, there has to be some purpose behind it. The following program gives weird out

5条回答
  •  囚心锁ツ
    2020-11-30 21:53

    See here

    An optional starting asterisk indicates that the data is to be retrieved from stdin but ignored, i.e. it is not stored in the corresponding argument.

提交回复
热议问题