I'm a beginner who just started learning coding. After the first class, I got confused during the assignment, so I'm leaving a question like this.
#include <stdio.h>
int main(void)
{
char str[300];
printf("enter your password: ");
scanf_s("%s", str, sizeof(str));
printf("your password: %s\n", str);
return o;
}
There seems to be no problem, but the green wave of the error mark keeps popping up on the scanf side.
And from the list below --> *C6328 size mismatch: 'unsigned_int64' passed to _Param(3) 'unsigned int' is required for the next call. 'scanf_s'. **
The phrase keeps popping up. And the debugs keep failing.
Is there any solution?
c
The long character output range must be [256].
If you just fix this...
char str[256];
printf("enter your password: ");
scanf_s("%s", str, sizeof(str));
printf("your password: %s\n", str);
It runs well.
© 2024 OneMinuteCode. All rights reserved.