Home > other >  0 x0f72e224 (ucrtbased. DLL) (located in project1. Exe) caused by abnormal: 0 xc0000005: when writin
0 x0f72e224 (ucrtbased. DLL) (located in project1. Exe) caused by abnormal: 0 xc0000005: when writin

Time:09-17




#include
Int main ()
{
Int a, b;
Float x, y;
Char c1 and c2.
Scanf_s (" % d % d ", & amp; A, & amp; B);
Scanf_s (" % f % e ", & amp; X, & amp; Y);
Scanf_s (" % c % c ", & amp; C1, & amp; C2);
Printf (" a=% d, b=% d, x=% f, y=% f, % c1=c, c2=% c \ n ", a, b, x, y, c1, c2);
return 0;
}

CodePudding user response:

How to solve the

CodePudding user response:

In vs environment, character length must be addressed when scanf_s function calls, change the line 9 to scanf_s (" % c % c ", & amp; C1, 1, & amp; C2, 1); Should be no problem for the
  • Related