#include<stdio.h> int main() { char s[] = "ABC"; char str[48]; printf("文字列str:"); scanf_s("%s",&str); printf("文字列sは\"%s\"です\n", s); printf("文字列strは\"%s\"です\n", str); s[0] = '\0'; str[0] = '\0'; printf("文字列s を空文字列\"%s\"にしました。\n",s); printf("文字列strを空文字列\"%s\"にしました。\n", str); return 0; }
visual studio2017
scanf_s 書式文字列として渡された引数が不足しています
とでます。何が原因なのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。