Home > Back-end >  The great spirit to solve
The great spirit to solve

Time:09-28

#include
#include
Int main () {
Char a='+'.
//char a=0;
//printf (" please enter the characters: ");//+. -. *./
//scanf_s (" % c ", & amp; A);
Printf (" you input is % c, ", a);
Printf (" input characters stance you how many bytes % d ", sizeof (a));
system("pause");
return 0;
}
Can't input in x86 environment, but can be direct assignment;
Under the environment of x64 can input, this is out of memory? But all is a byte!

CodePudding user response:

Estimation is the problem that your compiler,

CodePudding user response:

reference 1st floor CHXCHXKKK response:
estimation is the problem that your compiler,

I am using VS2017

CodePudding user response:

If you have a good look at documentation scanf_s parameter is wrong, should have a parameter specifies the length of the
Scanf_s (" % c ", & amp; A, 1);

CodePudding user response:

reference qybao reply: 3/f
do you have a good look at documentation scanf_s parameters is wrong, should have a parameter specifies the length of the
Scanf_s (" % c ", & amp; A, 1);

Seemed to say, I won't try to work now, you said scanf_s (" % c ", & amp; 1 a, 1) is to specify the length of the character?

CodePudding user response:

M0_46630320
reference 4 floor response:
Quote: reference qybao reply: 3/f
do you have a good look at documentation scanf_s parameters is wrong, should have a parameter specifies the length of the
Scanf_s (" % c ", & amp; A, 1);

Seemed to say, I won't try to work now, you said scanf_s (" % c ", & amp; 1 a, 1) is to specify the length of the character?

Enter a single character char to specify length, too?

CodePudding user response:

reference 5 floor m0_46630320 reply:
Quote: refer to 4th floor m0_46630320 response:
Quote: refer to the third floor qybao response:
do you have a good look at documentation scanf_s parameters is wrong, should have a parameter specifies the length of the
Scanf_s (" % c ", & amp; A, 1);

Seemed to say, I won't try to work now, you said scanf_s (" % c ", & amp; 1 a, 1) is to specify the length of the character?

Enter a single character char to specify length, too?

If the specified length continuous input is also used after the getchar () to absorb the enter key

CodePudding user response:

refer to 6th floor m0_46630320 response:
if the specified length continuous input is also used after the getchar () to absorb the enter key?

Need, or who enter persistence will help you to receive
  • Related