C language system

  1. Square root: sqrt(num);.
  2. Square: num * num; or pow(num, 2);.
    Note: You need to add #include <math.h> when using sqrt() or pow().

3. When using strings:
pre-compilation: #include<string.h>

When using gets input, pay attention to the previous carriage return, remember to use scanf("") or getchar() to handle the carriage return.

strlen() finds the length of the string.
The end of the'\0' string.

4. Regarding the
alias of the structure typedef,
{ }; when defining the structure, the semicolon cannot be lost.

Guess you like

Origin blog.csdn.net/hx_521/article/details/83928823