Why do I have to specify data type each time in C?

后端 未结 11 2730
温柔的废话
温柔的废话 2020-12-12 18:17

As you can see from the code snippet below, I have declared one char variable and one int variable. When the code gets compiled, it must identify t

11条回答
  •  借酒劲吻你
    2020-12-12 18:29

    scanf as prototype int scanf ( const char * format, ... ); says stores given data according to the parameter format into the locations pointed by the additional arguments.

    It is not related with compiler, it is all about syntax defined for scanf.Parameter format is required to let scanf know about the size to reserve for data to be entered.

提交回复
热议问题