C / C ++ library functions -2020-3-8
Function name | Function Model | Features | return value | head File |
---|---|---|---|---|
abs | int abs(int x) | Seeking the absolute value of the integer x | Calculation results | #include <stdlib.h> or #include <cstdlib> |
fabs | double fabs(double x) | Seeking absolute value of x | Calculation results | #include <math.h> |
islower | int islower(int ch) | Ch check whether lowercase letters | That returns 1, No, returns 0 | #include <ctype.h> or#include<cctype |
cos | double cos(double x) | Calculating cos (x) | Calculation results | #include <math.h> |
pow | double pow(double x,double y) | Calculated X Y value | Calculation results | #include <math.h> |
rand | int rand(void) | Generate random numbers | Random integer | #include <stdlib.h> or #include <cstdlib> |
toupper | int toupper(int ch) | The characters are converted to uppercase ch | And the corresponding capital letters ch | #include <ctype.h> or#include<cctype |
strlen | unsigned int strlen(char *str) | Counting the number of characters in the string str | Returns the number of characters | #include <string.h> or#include <string> |
max | Seeking maximum | Returns the maximum value | ||
me | For the minimum | Returns the minimum value |