Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Why can't vs20 12sqrt use plastic surgery while vc can? There is also the vs preprocessor problem about scanf and scanf _ s.
Why can't vs20 12sqrt use plastic surgery while vc can? There is also the vs preprocessor problem about scanf and scanf _ s.
Sqrt is used for floating-point numbers. Forced conversion.

y =(int)sqrt((double)x);

-

Scanf_s is more secure than scanf. Scanf _ s checks the type of input data to see if the input data matches the variable.

For example, the string char name[ 10], whether the given string is too long or not, and whether it exceeds the declared size. The name [10] can only contain 9 characters and 1 string terminators.

Scanf does not check the input data.