This function primarily handles
files.
In C, devices other than disks can also be treated as files.
You can also treat them as designated file pointers.
stdin (standard input), typically from the keyboardstdout: standard output (usually the display)stderr 標準Error出力(普通はディスプレイ)
These can also be modified by users through methods such as redirects.
Depending on the environment, it may be associated with another device or disabled.
function型 : FILE *fopen(const char *filename, const char *mode);[br]Arguments: filename, mode stringReturn value: Opened file pointer.NULL on failure.[br]Function: [b]Open file.[/b][/b][br]Mode: r read, w new, a append."b-suffix for binary, + suffix for input/output."
function型 : int fclose(FILE *fp);[br]Argument: File pointerReturn value: 0 on success, EOF on failure.Function: [b]Close file.[/b][/b]
function型 : int fgetc(FILE *fp);[br]Argument: File pointerReturn value: The character read."Failure or end of file (EOF)."[br]機能 : [b]Fileから<文字読み出す。[/b]
Function: Identical to fgetc.[/b][br]Caution: May contain macros, so be aware of potential side effects.[br]
function型 : char *fgets(char *s, int n, FILE *fp);[br]Arguments: Buffer to store the string, buffer size, file pointerReturn value: The buffer specified as an argument.NULL if failed or reached the end.[br]機能 : [b]Fileから<行読み出す。The result includes a line break.[/b]
function型 : int fputc(int c, FILE *fp);[br]Arguments: Character, File pointerReturn value: output character.When it fails, EOF.[br]機能 : [b]Fileに<文字書き込む。[/b]
Function: Identical to fputc.[/b][br]Caution: May contain macros, so be aware of potential side effects.[br]
function型 : int fputs(const char *s, FILE *fp);[br]Arguments: String, File pointerReturn value: True on success, EOF on failure.[br]Function: [b]Write a string to a file.[/b][/b]
function型 : size_t fread(void *ptr, size_t size, size_t nelem, FILE *fp);[br]argument : 読み込み結果を格納するバッファ、<項目のサイズ、項目数、FilePointer[br]Return value: The number of items read.0 if it fails.[br]Function: [b]Reads fixed-size items from a file.[/b][/b]
function型 : size_t fwrite(const void *ptr, size_t size, size_t nelem, FILE *fp);[br]argument : 書き込むバッファ、<項目のサイズ、項目数、FilePointer[br]Return value: The number of items written.0 if it fails.[br]Function: [b]Writes fixed-size items to a file.[/b][/b]
function型 : int fprintf(FILE *fp, const char *format, ...);[br]Arguments: File pointer, formatted string, variable number of argumentsReturn value: Number of characters output."Negative value when failed."[br]Function: [b]Writes formatted strings to a file.[/b][/b]
function型 : int fscanf(FILE *fp, const char *format, ...);[br]Arguments: file pointer, format string, variable number of buffersReturn value: The number of conversions that succeeded.失敗した場合は-<。[br]Function: Reads strings from a file and converts them to a specified format.[/b]
function型 : long ftell(FILE *fp);[br]Argument: File pointerReturn value: The current file position.[br]Function: [b]Get file location.[/b][/b]
function型 : int fseek(FILE *fp, long offset, int ptrname);[br]Arguments: file pointer, number of positions to move, reference point for position movement.Return value: 0 on success, non-zero on failure.[br]Function: [b]Move file location.[/b][/b][br]Position : SEEK_SET beginning, SEEK_CUR current position, SEEK_END end.
function型 : int fgetpos(FILE *fp, fpos_t *ptr);[br]Arguments: File pointer, pointer to a variable to store the file position.Return value: 0 on success, non-zero on failure.Function: [b]Stores the current file position.[/b][/b]
function型 : int fsetpos(FILE *fp, const fpos_t *ptr);Arguments: File pointer, pointer to a variable to store the file position.Return value: 0 on success, non-zero on failure.[br]Function: [b]Move file location.[/b][/b]
function型 : int feof(FILE *fp);[br]Argument: File pointerReturn value: True if the end is reached, false otherwise.[br]Function: [b]Check if the file has reached the end.[/b][/b]
function型 : int ferror(FILE *fp);[br]Argument: File pointerReturn value: True if an error occurred, false otherwise.[br]Function: [b]Check if there are errors in the file.[/b][/b]
function型 : void clearerr(FILE *fp);[br]Argument: File pointerFunction: [b]Recovery from file errors.[/b][/b]
function型 : int fflush(FILE *fp);[br]Argument: File pointerReturn value: 0 on success, false on failure.[br]Function: [b]Force the output of the output buffer.[/b][br]Caution: Some compilers may clear the input buffer.However, it is heretical.
function型 : FILE *freopen(const char *filename, const char *mode, FILE *fp);[br]Arguments: filename, mode string, file pointerReturn value: The file pointer specified as an argument.NULL on failure.[br]Function: [b]File pointer reallocation.[/b]
function型 : int rename(const char *oldname, const char *newname);[br]Arguments: current filename, new filenameReturn value: 0 on success, non-zero on failure.[br]Function: [b]Rename file.[/b]
function型 : int remove(const char *filename);[br]Arguments: FilenameReturn value: 0 on success, non-zero on failure.[br]Function: [b]Delete files.[/b][/b]
Function: int getchar(void);Return value: The character read.If it fails, EOF.[br]機能 : [b]標準入力(キーボード)から<文字読み込む。[/b]
Function: int putchar(char c);Argument : Character[br]Return value: output character.When it fails, EOF.[br]機能 : [b]標準出力(ディスプレイ)に<文字書き込む。[/b]
function型 : char *gets(char *s);[br]Arguments: buffer[br] to store the read string.Return value: The buffer specified as an argument.NULL if failed or reached the end.[br]機能 : [b]標準入力(キーボード)から<行読み出す。The result will not contain any line breaks.[/b][br]Warning: Do not use, as it can cause a buffer overflow (potential virus intrusion).
function型 : int puts(const char *s);[br]Argument : StringReturn value: 0 on success, non-zero on failure.[br]機能 : [b]標準出力(ディスプレイ)に<行書き込む。It will be wrapped.[/b]
function型 : void perror(const char *s);[br]Arguments: String to display [br]Function: Displays the immediately preceding error along with the specified string.[/b]
function型 : int printf(const char *format, ...);[br]Arguments: Formatted string, variable number of variablesReturn value: Number of characters output.失敗したときは-<。[br]Function: Writes a formatted string to standard output (display).[/b]
function型 : int scanf(const char *format, ...);[br]Arguments: format string, variable number of buffersReturn value: The number of conversions that succeeded.失敗した場合は-<。[br]Function: Reads strings from standard input (keyboard) and converts them to a specified format.[/b][br]Caution: May exhibit unexpected behavior when used with other input functions.
A collection of generic functions that don't fit into a specific category.
Memory-related, process-related, and conversions.
function型 : void *malloc(size_t n);[br]Arguments: Size of memory to allocate [br]Return value: the address of the allocated memory.If not acquired, return NULL.[br]Function: [b]Dynamically allocate memory.[/b]
function型 : void *calloc(size_t int nelem, size_t elsize);[br]argument : 要素数、<要素のサイズ[br]Return value: the address of the allocated memory.If not acquired, return NULL.[br]Function: [b]Dynamically allocate memory.The allocated memory is zeroed.[/b][br]Caution: Don't assume fewer bugs just because of zero-clear.
function型 : void *realloc(void *ptr, size_t size);[br]Arguments: the address of the allocated memory, the new memory size.[br]Return value: the address of the allocated memory.If not acquired, return NULL.[br]Function: [b]Change the size of allocated memory.The content will be preserved.[/b][br]Please note that the memory address may change.
function型 : void free(void *p);[br]Argument : Address of the allocated memory [br]Function: Release dynamically allocated memory.[/b]
Function: int abs(int n);Arguments : Number[br]Return value: Absolute value of the numberFunction: Calculate the absolute value.[/b]
Function: long labs(long n);Arguments : Number[br]Return value: Absolute value of the numberFunction: Calculate the absolute value.[/b]
function型 : double atof(const char *s);[br]Arguments: String containing numbersReturn value: The transformed value."0 if not convertible."[br]Function: Converts a string containing numbers to a floating-point number.[/b]
function型 : int atoi(const char *s);[br]Arguments: String containing numbersReturn value: The transformed value."0 if not convertible."[br]Function: Converts strings containing numbers into integer values.[/b]
function型 : long atol(const char *s);[br]Arguments: String containing numbersReturn value: The transformed value."0 if not convertible."[br]Function: Converts strings containing numbers into integer values.[/b]
function型 : double strtod(const char *s, char **endptr);[br]Arguments: String containing numbers, address of the end positionReturn value: The transformed value."0 if not convertible."[br]Function: Converts a string containing numbers to a floating-point number.[/b]
function型 : long strtol(const char *s, char **endptr, int base);[br]argument : digitをInclude文字列、終了位置のaddress、numericsの基数(binary digitsや<6進数)[br]Return value: The transformed value."0 if not convertible."[br]Function: Converts strings containing numbers into integer values.[/b]
function型 : unsigned long strtoul(const char *s, char **endptr, int base);[br]argument : digitをInclude文字列、終了位置のaddress、numericsの基数(binary digitsや<6進数)[br]Return value: The transformed value."0 if not convertible."[br]Function: Converts a string containing digits to an unsigned integer value.[/b]
Functional: div_t div(int num, int denom);Arguments : dividend, divisor.[br]Return value: The result of the division.[br]Features: [b]Calculates quotient and remainder simultaneously.[/b][br]Structure: struct div_t { int quot; 商; int rem; 余り. }[br]Note: We recommend using the operators / and % with this function.
Functional: ldiv_t ldiv(long num, long denom);Arguments : dividend, divisor.[br]Return value: The result of the division.[br]Features: [b]Calculates quotient and remainder simultaneously.[/b][br]Structure: ldiv_t structure, long quot (quotient), long rem (remainder).[br]Note: We recommend using the operators / and % with this function.
Function: int rand(void);Return value: a random value.The scope is dependent on the processing system.[br]Function: [b]Generate a random number.[/b][/b][br]使用法 : #define RANDOM(MIN,MAX) ((MIN)+(int)(rand()/(float)RAND_MAX*((MAX)-(MIN)+<)))[br]"If so, you can obtain a random number between min and max."
Function: void srand(unsigned int seed);Argument: Initial seed value for the random number sequence.[br]Function: [b]Provides the initial value for the random number sequence.[/b][br]"The standard practice is `srand((unsigned int)time(0));`."
Function: void exit(int n);Arguments: Exit code.Generally, EXIT_SUCCESS indicates successful termination, while EXIT_FAILURE indicates abnormal termination.[br]Function: [b]Terminate the program.[/b][/b]
Function: void abort(void);Function: [b]Terminates the program abnormally.[/b][br]Note: Used for exiting in case of an error.
function型 : int atexit(void (*func)(void));[br]Arguments : Function addressReturn value: 0 on success, non-zero on failure.[br]Function: Registers a function to be executed upon program termination.[/b]
function型 : char *getenv(const char *name);[br]Arguments : Name[br]Return value: The address of the beginning of the string containing the value.If not found, NULL.[br]Function: Retrieves environment variables.[/b]
function型 : void *bsearch(const void *key, const void *base,size_t nmemb,size_t size, int (*compar)(const void *x, const void *y));[br]argument : 探す値、arrayの先頭、探索数、<要素のサイズ、比較functionのaddress[br]Return value: Address of the found element.If not found, NULL.[br]Function: Performs binary search.The data must be sorted in ascending order.[/b][br]比較 : 比較functionは、x > yの場合は正、x = yの場合は0、x < yの場合は負を返すこと。
function型 : void qsort(void *base, size_t nel, size_t width,int(*compar)(const void *x, const void *y));[br]argument : arrayの先頭、整列個数、<要素のサイズ、比較functionのaddress[br]Function: Sort the array in ascending order.I often use quicksort.[/b][br]比較 : 比較functionは、x > yの場合は正、x = yの場合は0、x < yの場合は負を返すこと。
function型 : int system(const char *string);[br]Arguments: Command string.[br]Return value: System command dependent.コマンドをrunできなかった場合は-<。[br]Function: [b]Execute commands provided by the system.][/b][br]Note: As expected, commands are incompatible when the processing systems differ.[br]": NULL is specified, the command returns 0 in environments where the command is unavailable."
A set of functions for handling single-byte characters.
It's mostly implemented as a macro.
Functional: int isalpha(int c);Argument : Character[br]Return a value other than 0 if the character is an alphabet; otherwise, return 0.[br]Function: Determines if a character is an alphabet letter.[/b]
Function: int isupper(int c);Argument : Character[br]Return a value other than 0 if the character is an uppercase English letter; otherwise, return 0.[br]Function: [b]Checks if a character is an uppercase letter.[/b][/b]
Function: int islower(int c);Argument : Character[br]Return: A value other than 0 if the character is a lowercase English letter; otherwise, return 0.[br]Function: Determines if a character is a lowercase English letter.[/b]
Function: int isdigit(int c);Argument : Character[br]Return value: Non-zero if the character is a digit, zero otherwise.[br]Function: [b]Determines if a character is a digit.[/b][/b]
Function: int isspace(int c);Argument : Character[br]Return a non-zero value if the character is a whitespace character; otherwise, return 0.[br]Function: Determines if a character is a whitespace character.[/b]
Function: int isalnum(int c);Argument : Character[br]Return: Non-zero if the character is not an alphabet or digit, otherwise 0.[br]Function: Determines if a character is an alphabet or a number.[/b]
Function: int iscntrl(int c);Argument : Character[br]Return value: A non-zero value if the character is a control character, 0 otherwise.[br]Function: Determines if a character is a control character.[/b]
Function: int isgraph(int c);Argument : Character[br]Return 0 if the character is a printable character other than a space; otherwise, return 0.[br]Function: Determines if a character is a printable character (excluding spaces).[/b]
Function: int isprint(int c);Argument : Character[br]Return: 0 if the character is printable, otherwise 0.[br]Function: Determines if a character is a printable character.[/b]
Function: int ispunct(int c);Argument : Character[br]Return value: Non-zero if the character is a delimiter, 0 otherwise.[br]Function: [b]Determines if a character is a delimiter.[/b][/b]
Function: int isxdigit(int c);Argument : Character[br]return value : 文字が<6進数用の文字なら0以外、異なる場合は0。[br]機能 : [b]文字が<6進数用の文字か判定する。[/b]
A collection of functions primarily for string manipulation.
Many functions can also be shared with generic memory processing.
Please note that the reference is based on half-width characters, so be careful when handling full-width characters.
function型 : char *strcpy(char *s, const char *t);[br]Arguments: Character array, stringReturn: Returns the argument character array as is.Function: Copies a string to a character array.to be used for string assignment.[/b]
function型 : char *strncpy(char *s, const char *t, size_t n);[br]Arguments: Character array, string, maximum number of characters to copyReturn value: Returns the argument character array as is.[br]Function: Copies a string to a character array for a specified number of characters.[/b][br]Caution: When the character count is high, do not add null characters [br].Be sure to append a null character as s[n] = '\0';.
function型 : char *strcat(char *s, const char *t);[br]Arguments: Character array, stringReturn: Returns the argument character array as is.Function: Appends a string to the end of a character array.[/b]
function型 : char *strncat(char *s, const char *t, size_t n);[br]Arguments: Character array, string, maximum number of characters to concatenate [br]Return value: Returns the argument character array as is.[br]Function: Appends a specified number of characters to the end of a character array.[/b]
function型 : size_t strlen(const char *s);[br]Argument : StringReturn value: The length of the string.Do not include null characters.[br]Function: Returns the length of a string.[/b]
function型 : int strcmp(const char *s, const char *t);[br]argument : 文字列<、文字列2[br]return value : 文字列<が大きいときは正、同じTimeは0、文字列2が大きいときは負。[br]機能 : [b]文字列<と文字列2を比較する。[/b]
function型 : int strncmp(const char *s, const char *t, size_t n);[br]argument : 文字列<、文字列2、比較number of characters[br]return value : 文字列<が大きいときは正、同じTimeは0、文字列2が大きいときは負。[br]Function: Compares strings up to a specified number of characters.[/b]
function型 : char *strchr(const char *s, int c);[br]Arguments: String, CharacterReturn value: The address of the found location, or NULL if not found.[br]Function: Searches for characters starting from the beginning of a string.[/b]
function型 : char *strrchr(const char *s, int c);[br]Arguments: String, CharacterReturn value: The address of the found location, or NULL if not found.[br]Function: [b]Searches for a character from the end of a string.[/b][/b]
function型 : size_t strcspn(const char *s, const char *t);[br]Arguments: Target string, search stringReturn value: The number of characters to the found position.[br]Function: [b]Searches for characters contained in the search string within the target string.[/b][/b]
function型 : size_t strspn(const char *s, const char *t);[br]Arguments: Target string, search stringReturn value: Number of characters to the not found position.[br]Function: [b] Search for characters not contained in the search string within the target string.[/b]
function型 : char *strpbrk(const char *s, const char *t);[br]Arguments: Target string, search stringReturn value: pointer to the first character found, or NULL if not found.[br]Function: Searches for characters contained in the search string, starting from the beginning of the target string.[/b]
function型 : char *strstr(const char *s, const char *t);[br]Arguments: Target string, search stringReturn value: Pointer to the found location, or NULL if not found.[br]Function: [b] Searches for the search string within the target string.[/b]
function型 : char *strtok(char *s, const char *t);[br]Arguments: Character array, delimiter stringReturn value: A pointer to the tokenized word.If not found, NULL.[br]Function: Splits a character array at positions containing characters from the delimiter string.[/b][br]Calling the function with a null character array allows you to retrieve the next word.
function型 : char *strerror(int n);[br]Arguments : Error number[br]Return value: An array containing the error message.An empty string if no corresponding error exists.[br]Function: [b]Retrieve error messages.[/b][/b][br]Caution: Do not modify the contents of the obtained array.
function型 : void *memcpy(void *dest, const void *source, size_t count);[br]Arguments: Destination, Source, Copy SizeReturn the destination of the argument copy.Function: [b]Copies memory contents.[/b]It doesn't work when the copy areas overlap.[/b]
function型 : void *memmove(void *dest, const void *source, size_t count);[br]Arguments: Destination, Source, Copy SizeReturn the destination of the argument copy.Function: [b]Copies memory contents.[/b]Overlapping copy areas are acceptable.[/b][br]Note: Despite the name "move," it does not refer to movement, so please be aware.
function型 : void *memset(void *addr, int byte, size_t count);[br]Arguments: Array, Number, Assignment SizeReturn value: Returns the argument array as is.Function: Assign a numerical value to all elements of a specified size in memory.Can also be used for characters.[/b]
function型 : int memcmp(const void *addr<, const void *addr2, size_t n);[br]argument : array<、array2、比較サイズ[br]return value : array<が大きいときは正、同じTimeは0、array2が大きいときは負。[br]Function: [b]Compare memory locations."It can also compare strings."[/b]
function型 : void *memchr(const void *addr, int byte, size_t count);[br]argument : array、<バイトのnumerics、検索するサイズ[br]Return value: The address of the found location, or NULL if not found.[br]Function: [b]Search for numbers in memory.[/b]<文字検索にも使える。[/b]
A suite of basic mathematical functions.
Please note that the angle is expressed in radians.
The conversion from degrees to radians is as follows.
radians = (degrees * 3.14159 / 180)
Function: double fabs(double x);Argument: Real numberReturn value: Absolute valueFunction: Calculate the absolute value.[/b]
Function: double sqrt(double x);Argument : Optional real numberReturn value: square root機能 : [b]square rootを計算する[/b]
Function: double pow(double x, double y);Arguments: value to be raised, exponent[br]Return value: x raised to the power of yFunction: Calculates exponents.[/b]
Function: double fmod(double x, double y);Arguments: dividend, divisorReturn value: RemainderFunction: Calculates the remainder of a real number.[/b]
Functional : double sin(double x);Arguments: Angle in radiansReturn value: Sign value [br]機能 : [b]サインを計算する[/b]
Functional : double cos(double x);Arguments: Angle in radiansReturn value: Cosine value機能 : [b]コサインを計算する[/b]
Function: double tan(double x);Arguments: Angle in radiansReturn value: Tangent value機能 : [b]タンジェントを計算する[/b]
Function: double acos(double x);Arguments: Cosine valueReturn value: arccosine (radians)機能 : [b]アークコサインを計算する[/b]
Function: double asin(double x);Arguments: Sign value[br]Return value: arcsine (radians)機能 : [b]アークサインを計算する[/b]
Function: double atan(double x);Argument: Value of tangentReturn value: Arctangent (radians)Function: [b]Calculate the arctangent.[/b][/b][br]The value will be in the range of π/2.
Function: double atan2(double y, double x);Arguments: Vertical value, Horizontal valueReturn value: Arctangent (radians)Function: [b]Calculate the arctangent.[/b][/b][br]The value will be within the range of π, and the calculation can be performed even when the argument x is 0.
Function: double sinh(double x);Arguments: Angle in radiansReturn value: hyperbolic sine valueFunction: [b]Calculates the hyperbolic sine value[/b]"(exp(x) - exp(-x)) / 2"
Function: double cosh(double x);Arguments: Angle in radiansReturn value: Hyperbolic cosine valueFunction: [b]Calculates hyperbolic cosine values[/b]The same as (exp(x) + exp(-x)) / 2.
Function: double tanh(double x);Arguments: Angle in radiansReturn value: Hyperbolic tangent valueFunction: [b]Calculate hyperbolic tangent values[/b]sinh(x) / cosh(x)
Function: double ceil(double x);Argument : Optional real numberReturn value: An integer greater than or equal to the input value.Function: [b]Round real numbers to integer values.[/b]
Function: double floor(double x);Argument : Optional real numberReturn value: integer value less than or equal to the input value.Function: [b]Round real numbers to integer values.[/b]
Function: double exp(double x);Argument: Real numberReturn value: x raised to the power of the natural logarithm base.Function: [b]Calculate indices.[/b]
Function: double log(double x);Argument : Optional real numberReturn value: Natural logarithmFunction: Calculates the natural logarithm.[/b]
function型 : double log<0(double x);[br]Argument : Optional real numberReturn value: Common logarithmFunction: Calculates common logarithms.[/b]
function型 : double modf(double x, double *ip);[br]Arguments : An arbitrary real number, returns the integer part of the value.Return value: Fractional part valueFunction: [b] Splits a real number into its integer and fractional parts.[/b]
function型 : double frexp(double x, int *p);[br]Arguments : An arbitrary real number, returns the exponent part of the value [br]Return value: Mantissa value機能 : [b]Floating-point値の指数部と仮数部を求める[/b]
Function: double ldexp(double x, int p);Arguments : Significand, ExponentReturn value: Synthesized floating-point valueFunction: Calculates a floating-point value from a significand and an exponent.[/b]
A suite of functions for handling time.These functions are from UNIX conventions.
"Based on
00:00:00 Coordinated Universal Time (UTC) on January 1, 1970."
Moving forward, we will refer to January 1, 1970, 00:00:00 as
the reference time in all documentation.
function型 : time_t time(time_t *t);[br]Arguments: [br] Address of the variable holding the timestampReturn value: Seconds elapsed since the reference time.Function: Returns the elapsed seconds since the reference time.[/b][br]Note: It can be called with NULL arguments and only the return value is retrieved.Depending on the context, units other than seconds may be used.
Functional: clock_t clock(void);Arguments: NoneReturn value: Processed time[br]Function: Returns the process time used by the program.[/b][br]Note: You can obtain a value in seconds by using clock() / CLOCKS_PER_SEC.[br]Warning: May not match elapsed time in multithreaded environments.
function型 : double difftime(time_t t<, time_t t2);[br]argument : 基準Timeからのprogresssecond数<、基準Timeからのprogresssecond数2[br]Return value: the difference between two elapsed times.Function: [b]Subtract time[/b]Depending on the context, units other than seconds may be used.
function型 : struct tm *localtime(const time_t *t);[br]Arguments: Seconds elapsed since the reference time.Return value: A structure containing the converted domestic time information from seconds.Function: Converts seconds elapsed from a reference time to a local time.[/b][br]Caution: The return value is a shared memory area across the entire system,It is essential to copy it to a separate structure as declared beforehand.
function型 : struct tm *gmtime(const time_t *t);[br]Arguments: Seconds elapsed since the reference time.Return value: A structure containing the epoch seconds converted to UTC.Function: Converts elapsed seconds from a reference time to international time.[/b][br]Caution: The return value is a shared memory area across the entire system,It is essential to copy it to a separate structure as declared beforehand.
function型 : char *asctime(const struct tm *tm);[br]Arguments: A structure containing a timestamp.Return value: Address of the transformed timestamp string [br]機能 : [b]Timeを Wed Feb <7 20:<4:04 <988 のような文字列に変換する。[/b][br]Caution: The return value is a shared memory area across the entire system,It is essential to copy it to a separate structure as declared beforehand.
function型 : char *ctime(const time_t *t);[br]Arguments: Seconds elapsed since the reference time.Return value: Address of the transformed timestamp string [br]機能 : [b]Timeを Wed Feb <7 20:<4:04 <988 のような文字列に変換する。[/b][br]Caution: The return value is a shared memory area across the entire system,It is essential to copy it to a separate structure as declared beforehand.
function型 : size_t strftime(char *s, size_t smax, const char *fmt, const struct tm *tp);[br]Arguments: character array, size of the character array, time format string, structure containing the time.Return value: The number of characters written to the array.0 if it fails.[br]Function: Converts a time to a string in the specified format.[/b]
A set of functions primarily responsible for program control.
These each have different header files.
<assert.h> を必要とするfunction群
Function: void assert(int expression);Arguments: [br] Diagnostic variable valueReturn value: NoneFunction: [b]Perform diagnostics for debugging.[/b][br]Note: If the value set as an argument is 0,Terminates abruptly, displaying the name of the source file and line number.If the NDEBUG constant is defined, it will be removed during compilation.
<signal.h> を必要とするfunction群
Function: int raise(int sig);Arguments: The signal value to send.Return value: 0 on success, non-zero on failure.[br]Function: [b]Send a signal to the program.[/b][/b]
function型 : void (*signal(int sig, void (*handler)()))();[br]Arguments: The signal value to set, the address of the function to handle the signal.Return value: The address of the previously set function, or SIG_ERR on failure.[br]Function: [b]Sets a function to process signals.[/b][/b]
<setjmp.h> を必要とするfunction群
Functional : int setjmp(jmp_buf env);Argument: The address of the variable that will hold the next state.Return value: 0 when first called, the value when returning via longjmp.[br]Function: Saves state in preparation for a longjmp function.[/b][br]Warning: This is a malicious function guaranteed to wreak havoc on program flow.Unless there's a compelling reason, don't use it.
Function signature: void longjmp(jmp_buf env, int val);Arguments: Address of the variable containing the target state, arbitrary return value[br]Return value: NoneFunction: [b]Perform wide-area jumps across functions[/b]Warning: This is a malicious function guaranteed to wreak havoc on program flow.Unless there's a compelling reason, don't use it.