putchar — write a single character
putchar writes one character to stdout. It returns the written character, or EOF on a write error.
CKTIS / C
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
putchar writes one character to stdout. It returns the written character, or EOF on a write error.
The puts function from <stdio.h> writes a string to stdout, appends a newline, and returns a result indicating success or failure.
qsort sorts an array using a comparison function that determines the ordering of its elements.
quick_exit terminates the program after invoking at_quick_exit handlers, skipping atexit handlers. It never returns to its caller.
raise(sig) triggers signal handling according to the current setting; it does not register a handler.
rand() returns a pseudorandom integer. srand() lets you reproduce a sequence within an implementation.
`realloc` resizes a dynamic allocation. Use a temporary pointer and check the result before replacing the existing pointer.
remainder computes a remainder using the nearest integer quotient, resolving halfway cases by choosing the even integer.
The remove function from <stdio.h> removes access to a file under the specified name. It returns zero on success and a nonzero value on failure.
The rename function from <stdio.h> changes a file's name. It returns 0 on success and a nonzero value on failure.
rewind positions a stream at the beginning of its file and clears its error indicator. It returns no result, so it cannot directly report whether repositioning succeeded.
rint rounds a finite double to an integer-valued result using the current rounding direction, while retaining the double type.
For a finite input, round from <math.h> returns the nearest integer value as a double. Exact halfway cases are rounded away from zero.
scanf reads stdin according to a format, storing results through pointers. Always check the call's return value.
`setbuf` from `<stdio.h>` requests full buffering if `buf` is non-null, or unbuffered operation if `buf` is `NULL`. The implementation may use the supplied array but is not required to. The function does not report whether the request was honored.
`setjmp` saves an environment in `jmp_buf`, allowing execution to resume through `longjmp`.
setlocale selects or queries C library locale settings, which affect behavior including numeric formatting.
setvbuf selects an open stream's buffering mode before other operations and allows a caller-supplied buffer.
signal from <signal.h> selects a signal's response: default handling, ignoring it, or invoking a handler.
The signbit macro from <math.h> checks whether a floating-point value has a negative sign, including zeros, infinities, and NaNs. A nonzero result need not equal 1.
The sin function from <math.h> computes the sine of a double argument measured in radians and returns a double.
The sinh function from <math.h> computes the hyperbolic sine of a double argument and returns a double.
snprintf writes formatted text into a buffer with a specified capacity. Its return value detects truncation; the capacity includes the terminating null character.
sprintf writes formatted text into a char array. It takes no buffer size: storage must also accommodate the terminating '\0'.