Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Knowledge base

Knowledge base

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

Entries: 5788

C++

std::max_element — iterator to the largest element

std::max_element searches a range and returns an iterator to its first largest element. An empty range yields last; an optional comparator determines the ordering.

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

std::memcpy — copying memory bytes

std::memcpy from <cstring> copies a specified number of bytes between non-overlapping memory regions. It does not check bounds and is not a replacement for copying resource-owning objects.

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

std::memory_order — ordering atomic operations

std::memory_order from <atomic> specifies ordering and synchronization for atomic operations. It distinguishes atomicity alone from safely publishing data between threads; incorrectly weakening an order can introduce a data race.

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

std::merge — stable merging of sorted ranges

std::merge from <algorithm> copies two sorted ranges into a separate output range. It preserves duplicates and stability, and returns an iterator one past the last element written.

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

std::min — selecting the smallest value

std::min from <algorithm> selects the smaller of two arguments or the minimum of a nonempty list. The two-argument overload returns a reference, while the list overload returns a copy; an optional comparator defines the ordering.

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

std::min_element — finding the smallest element

std::min_element from <algorithm> returns an iterator to the first smallest element in a range. It does not sort the data. For an empty range it returns last, so check the iterator before reading the result.

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

std::minmax — minimum and maximum

std::minmax from <algorithm> finds the minimum and maximum together. The two-argument overload returns a pair of references, whereas the initializer-list overload returns a pair of copied values.

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

std::minmax_element — positions of the minimum and maximum

std::minmax_element finds a range's minimum and maximum and returns a pair of iterators. Ties select the first minimum and last maximum; an empty range requires checking the result before dereferencing.

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

std::move — a cast that enables moving

std::move from <utility> exposes an object as an xvalue, enabling selection of a move operation. The call itself neither transfers resources nor empties the object; the actual effect depends on the operation that consumes its result.

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

std::move_backward — moving a range from the end

std::move_backward assigns range elements from last to first while preserving their order in the destination. It supports safely shifting an overlapping range to the right.

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

std::move_only_function — a move-only callable wrapper

C++23 std::move_only_function stores a callable with a specified signature, including a lambda owning an exclusive resource. The wrapper can be moved but not copied. It must contain a target before it is called.

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

std::multimap — ordered pairs with duplicate keys

std::multimap from <map> stores key–value pairs in key order and allows multiple elements with equivalent keys. equal_range retrieves the entire matching group, while erase(key) removes every element in that group.

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

std::multiset — an ordered container with duplicates

std::multiset from <set> stores keys in comparator-defined order and permits equivalent keys. Learn how lookup and counting work, and distinguish removing one element from removing every equivalent element.

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

std::mutex — mutual exclusion between threads

std::mutex from <mutex> allows only one thread at a time to own its lock. It protects shared data when all conflicting accesses follow the same locking protocol. std::lock_guard manages lock release within a scope.

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

std::nano — the one-billionth ratio

std::nano is a type alias from <ratio> representing the exact factor 1/1,000,000,000. It exposes the numerator num and denominator den as compile-time constants; it is neither a floating-point number nor a unit of time.

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

std::next — an advanced copy of an iterator

std::next from <iterator> returns a copy of an iterator advanced by n positions, defaulting to one. It also supports iterators without operator +. It does not check range boundaries; a negative offset requires a bidirectional iterator.

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

std::next_permutation — next lexicographical permutation

std::next_permutation rearranges a range into its next lexicographical permutation. It returns true when a successor exists; after the final permutation, it restores the first arrangement and returns false.

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

std::none_of — no element satisfies a condition

std::none_of from <algorithm> checks whether no element in a range satisfies a predicate. It returns bool: true means there are no matches, while false means at least one match exists. An empty range produces true.

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

std::noop_coroutine — a handle to a no-op coroutine

std::noop_coroutine() returns a non-null handle to a special coroutine whose resumption and destruction have no observable effects. It is not an empty handle.

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

std::nth_element — selecting an element by rank

std::nth_element places an element at the position it would occupy after a full sort without sorting the entire range. It is useful for finding a median or the kth smallest element.

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

std::numeric_limits — numeric type limits and properties

std::numeric_limits<T> from <limits> exposes the limits and representation properties of T. Learn how min() differs from lowest(), what digits measures, and how to check IEC 559 conformance without assuming a particular type size.

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

std::ofstream — writing to a file

std::ofstream from <fstream> writes data to a file through a stream interface. Learn about default content replacement, appending, and checking errors when opening, writing, and closing a file.

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

std::optional — a value that may be absent

std::optional<T> represents either an object of type T or no value. It separates a missing result from valid values such as 0. Check that a value is present before using the * and -> operators.

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

std::ostream and std::basic_ostream — output streams

std::basic_ostream is an output-stream template, and std::ostream is its alias for char. They support formatting values with operator<< and writing characters to an associated stream buffer.

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