开发者

Exception thrown at 0x7AC3EFD9 (ucrtbased.dll) in Trials.exe: 0xC0000005: Access violation writing location 0x00990000 Error shown in C#

Error is showing and what does this error mean? Also, for some reason, my VS does not accept "scanf" if someone could explain why or where I could read about it simply? Just started coding.

/* scanf example */ #include <stdio.h>
int main() { char str[80]; int i;
printf("Enter your family name: ");
scanf_s("%80s", str);
printf("Enter your age: ");
scanf_s("%d", &i);
printf("Mr. %s , %d years old.\n", str, i);开发者_如何学C
printf("Enter a hexadecimal number: ");
scanf_s("%x", &i);
printf("You have entered %#x (%d).\n", i, i);

return 0;
[enter image description here](https://i.stack.imgur.com/XucxI.png)

The program I copied had "scanf("%79", str);" I changed it to what you can see in the program, but the issue remains unsolved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜