format '%s' expects argument of type 'char *'

后端 未结 7 530
野趣味
野趣味 2021-01-11 10:32
#include 
int main(void)
{
    int i,j,k;
    char st;
    printf(\"enter string\\n\");
    scanf(\"%s\", st);         


        
7条回答
  •  甜味超标
    2021-01-11 10:44

    char st is a single character. Judging by the rest of your code, you probably intended to declare an array of characters:

    char st[80];
    

提交回复
热议问题