Home > Back-end >  I am a novice, who is a great god can tell me what this means, thank you!
I am a novice, who is a great god can tell me what this means, thank you!

Time:02-20

CodePudding user response:

Scanf_s (" % s ", name, 39);

CodePudding user response:

reference 1st floor forever74 response:
scanf_s (" % s ", name, 39);

Why do want to take a 39 behind ah,

CodePudding user response:

reference 1st floor forever74 response:
scanf_s (" % s ", name, 39);

Not like yo

CodePudding user response:

Scanf_s other usage, and the scanf is consistent, however,
Each % % s or c format character need corresponding to the two parameters, the second is the length limit,

CodePudding user response:

reference 4 floor forever74 response:
scanf_s other usage, and the scanf is consistent, however,
Each % % s or c format character need corresponding to the two parameters, the second is the length limit,

But I according to you this way to play or not ah,

CodePudding user response:

Reference:
 # include 
# define PARISE. "" you are a extraordinary being."
Int main ()
{
Char name [40].
Printf (" what is your name?" );
Scanf_s (" % s ", name, 40).
Printf (" Hello, % s. % s \ n ", the name, PARISE);

return 0;
}

Refer to baidu: https://www.zhihu.com/question/64044016

CodePudding user response:

Scanf_s (" % s ", [color=# 0000 ff] & amp; name [/color], 39);//must be variable addresses,

CodePudding user response:

refer to 6th floor QZJHJXJ response:
for reference:
 # include 
# define PARISE. "" you are a extraordinary being."
Int main ()
{
Char name [40].
Printf (" what is your name?" );
Scanf_s (" % s ", name, 40).
Printf (" Hello, % s. % s \ n ", the name, PARISE);

return 0;
}

Refer to baidu: https://www.zhihu.com/question/64044016

No, an error that is not a statement of identifier,

CodePudding user response:

Scanf_s (" % s ", & name, 39);

CodePudding user response:

refer to the eighth floor qq_52473673 response:
Quote: refer to the sixth floor QZJHJXJ response:
for reference:
 # include 
# define PARISE. "" you are a extraordinary being."
Int main ()
{
Char name [40].
Printf (" what is your name?" );
Scanf_s (" % s ", name, 40).
Printf (" Hello, % s. % s \ n ", the name, PARISE);

return 0;
}

Refer to baidu: https://www.zhihu.com/question/64044016

No, an error that is not a statement of identifier,

Sorry, just now I made a mistake, already ok, thank you.

CodePudding user response:

references to the tenth floor qq_52473673 response:
Quote: refer to the eighth floor qq_52473673 response:
Quote: refer to the sixth floor QZJHJXJ response:
for reference:
 # include 
# define PARISE. "" you are a extraordinary being."
Int main ()
{
Char name [40].
Printf (" what is your name?" );
Scanf_s (" % s ", name, 40).
Printf (" Hello, % s. % s \ n ", the name, PARISE);

return 0;
}

Refer to baidu: https://www.zhihu.com/question/64044016

No, an error that is not a statement of identifier,

Sorry, just now I made a mistake, already can, thank you.

Bother you again, why do you want to add a 40 behind?

CodePudding user response:

Reference: https://blog.csdn.net/Gnewocean/article/details/83793744? Utm_medium=distribute. Pc_relevant. None - task - blog - OPENSEARCH - 7. Control& Depth_1 - utm_source=distribute. Pc_relevant. None - task - blog - OPENSEARCH - 7. Control

CodePudding user response:

refer to the second floor qq_52473673 response:
Quote: refer to 1st floor forever74 response:
scanf_s (" % s ", name, 39);

Why do want to take a 39 behind ah,

40, or use sizeof (name), do not recommend using 39, with 39 is to consider the final '\ 0', don't need to care about scanf_s will consider add to the cache '\ 0' at the end of a byte or valid characters behind,

CodePudding user response:

The scanf () is not to use & amp; Symbols to draw address to receive? Scanf_s should also need,,,

CodePudding user response:

On the 14th floor qq_34124780
reference response:
the scanf () is not to use & amp; Symbols to draw address to receive? Scanf_s should also need,,,

This is an array name, don't need that
  • Related