Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C

Knowledge base — C

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 472

C

putchar — write a single character

putchar writes one character to stdout. It returns the written character, or EOF on a write error.

Basic · C23; repository compiler flag, production runtime not attested
C

puts — write text with a newline

The puts function from <stdio.h> writes a string to stdout, appends a newline, and returns a result indicating success or failure.

Basic · C23; repository compiler flag, production runtime not attested
C

qsort — sorting an array

qsort sorts an array using a comparison function that determines the ordering of its elements.

Intermediate · C23; repository compiler flag, production runtime not attested
C

quick_exit — terminate with separate handlers

quick_exit terminates the program after invoking at_quick_exit handlers, skipping atexit handlers. It never returns to its caller.

Intermediate · C23; repository compiler flag, production runtime not attested
C

raise — raise a signal

raise(sig) triggers signal handling according to the current setting; it does not register a handler.

Intermediate · C23; repository compiler flag, production runtime not attested
C

rand — pseudorandom integers

rand() returns a pseudorandom integer. srand() lets you reproduce a sequence within an implementation.

Basic · C23; repository compiler flag, production runtime not attested
C

realloc — resizing an allocation

`realloc` resizes a dynamic allocation. Use a temporary pointer and check the result before replacing the existing pointer.

Intermediate · C23; repository compiler flag, production runtime not attested
C

remainder — floating-point remainder

remainder computes a remainder using the nearest integer quotient, resolving halfway cases by choosing the even integer.

Intermediate · C23; repository compiler flag, production runtime not attested
C

remove — removing a file

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.

Basic · C23; repository compiler flag, production runtime not attested
C

rename — rename a file

The rename function from <stdio.h> changes a file's name. It returns 0 on success and a nonzero value on failure.

Basic · C23; repository compiler flag, production runtime not attested
C

rewind — return to the beginning of a file

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.

Basic · C23; repository compiler flag, production runtime not attested
C

rint — rounding using the current mode

rint rounds a finite double to an integer-valued result using the current rounding direction, while retaining the double type.

Intermediate · C23; repository compiler flag, production runtime not attested
C

round — rounding to the nearest integer value

For a finite input, round from <math.h> returns the nearest integer value as a double. Exact halfway cases are rounded away from zero.

Basic · C23; repository compiler flag, production runtime not attested
C

scanf — formatted input

scanf reads stdin according to a format, storing results through pointers. Always check the call's return value.

Basic · C23; repository compiler flag, production runtime not attested
C

setbuf — configuring stream buffering

`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.

Basic · C23; repository compiler flag, production runtime not attested
C

setjmp — save a calling environment

`setjmp` saves an environment in `jmp_buf`, allowing execution to resume through `longjmp`.

Advanced · C23; repository compiler flag, production runtime not attested
C

setlocale — select or query locale settings

setlocale selects or queries C library locale settings, which affect behavior including numeric formatting.

Intermediate · C23; repository compiler flag, production runtime not attested
C

setvbuf — configure stream buffering

setvbuf selects an open stream's buffering mode before other operations and allows a caller-supplied buffer.

Intermediate · C23; repository compiler flag, production runtime not attested
C

signal — configure signal handling

signal from <signal.h> selects a signal's response: default handling, ignoring it, or invoking a handler.

Advanced · C23; repository compiler flag, production runtime not attested
C

signbit — checking a floating-point value's sign

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.

Basic · C23; repository compiler flag, production runtime not attested
C

sin — sine of an angle in radians

The sin function from <math.h> computes the sine of a double argument measured in radians and returns a double.

Basic · C23; repository compiler flag, production runtime not attested
C

sinh — hyperbolic sine

The sinh function from <math.h> computes the hyperbolic sine of a double argument and returns a double.

Basic · C23; repository compiler flag, production runtime not attested
C

snprintf — formatting with a buffer limit

snprintf writes formatted text into a buffer with a specified capacity. Its return value detects truncation; the capacity includes the terminating null character.

Basic · C23; repository compiler flag, production runtime not attested
C

sprintf — formatting text into a buffer

sprintf writes formatted text into a char array. It takes no buffer size: storage must also accommodate the terminating '\0'.

Basic · C23; repository compiler flag, production runtime not attested