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::int64_t — exactly 64-bit signed integer type

std::int64_t from <cstdint> is an alias for a signed integer type with exactly 64 bits and no padding bits. Its availability is optional; do not assume that it always means long long.

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

std::int8_t — an exactly 8-bit signed integer

std::int8_t from <cstdint> is an optional alias for a signed integer type with exactly 8 bits and no padding bits. It stores values from -128 to 127. Calculations follow integral promotion rules, and explicitly converting to int is useful when printing its numeric value.

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

std::monostate — an explicit state without data

std::monostate is an empty type available through <variant>. It can represent an explicit state without data and, as the first std::variant alternative, enables default construction even when a later type has no default constructor.

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

std::nullptr_t — the type of nullptr

std::nullptr_t is the distinct type of the nullptr literal, made available by <cstddef>. It is not a pointer type: its values can produce null pointers, while the type itself lets function overloads recognize nullptr.

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

std::ptrdiff_t — pointer difference type

std::ptrdiff_t is an implementation-defined signed integer type from <cstddef>. It is the result type of pointer subtraction, representing a distance in elements rather than bytes, and can hold negative values.

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

std::size_t — the object-size type

std::size_t is an implementation-defined unsigned integer type that can represent the size of any object in bytes. It is the result type of sizeof and is declared by <cstddef>. Do not assume a particular width or use it to represent negative values.

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

std::uint16_t — an unsigned integer with exactly 16 bits

std::uint16_t from <cstdint> is an optional alias for an unsigned integer type with exactly 16 bits and a range of 0–65535. It is useful when an exact width is required, but it does not guarantee a two-byte size on every platform.

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

std::uint32_t — exact-width 32-bit unsigned type

std::uint32_t from <cstdint> aliases an unsigned integer type with exactly 32 bits and no padding bits. It holds values from 0 through 4294967295. Whether the alias is available depends on the implementation.

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

std::uint64_t — 64-bit unsigned integer

std::uint64_t from <cstdint> is an optional alias for an unsigned integer type with exactly 64 bits and no padding bits. It stores values from 0 through 18446744073709551615.

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

std::uint8_t — 8-bit unsigned integer type

std::uint8_t from <cstdint> is an optional alias for an unsigned integer type with exactly 8 bits and a range of 0–255. It undergoes integral promotions in calculations and may behave as a character when printed.

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

std::uintptr_t — an integer type for holding a pointer value

std::uintptr_t from <cstdint> is an unsigned integer type that supports converting a valid void* to an integer and back without losing the pointer value. It is optional in C++23 and specifies neither a fixed width nor a portable address format.

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

unsigned char — a one-byte unsigned integer type

unsigned char is an unsigned integer type distinct from char and signed char. It occupies one C++ byte, not necessarily eight bits. It is useful for byte values, but undergoes integral promotions in expressions.

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

unsigned int — unsigned integer type

unsigned int stores nonnegative integers and is a distinct type from int. It has at least 16 value bits, and its arithmetic operates modulo 2^N. Learn the equivalent unsigned spelling and the pitfalls of conversions and comparisons involving signed integers.

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

unsigned long — unsigned integer type

unsigned long is a standard unsigned integer type with a width of at least 32 bits. It is the same type as unsigned long int. Its exact range depends on the implementation, and arithmetic performed in this type follows modular rules.

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

unsigned long long — unsigned integer type

unsigned long long is a built-in unsigned integer type with at least 64 value bits. It stores nonnegative integers, and its arithmetic operates modulo 2^N. Its exact width depends on the implementation.

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

unsigned short — unsigned short integer type

unsigned short is a built-in unsigned integer type, equivalent to unsigned short int. It supports at least the values from 0 through 65535, but need not be exactly 16 bits wide. In calculations, it is subject to integral promotions.

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

void — a type with no values

void is a fundamental type with no values, used primarily as the return type of a function that returns no value. Objects of type void cannot be created. The separate type void* can hold object pointers without retaining their pointed-to type information.

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

wchar_t — wide character type

wchar_t is a distinct built-in integral type used for wide characters. The L prefix creates its corresponding literals. Size, signedness, and encoding depend on the implementation, so it is not a portable Unicode character type.

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

ArgumentOutOfRangeException — argument outside the allowed range

System.ArgumentOutOfRangeException signals that an argument value is outside the set accepted by a method. The exception can identify the parameter name and the rejected value.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

Array.Clone and Array.Sort: sorting an array copy

Combine Array.Clone with Array.Sort to obtain a sorted array copy without changing the original element order. Learn how a shallow copy differs from sharing the same array.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

Array.Empty<T> — an empty array of a specified type

Array.Empty<T>() returns a non-null array of type T[] with length zero. Use it to represent no elements without creating a new empty array on every call.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

Array.IndexOf — index of the first occurrence

System.Array.IndexOf finds the first occurrence of a value in an array or a range and returns its index.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

Array.Length — array element count

Array.Length returns an array's element count as int. For a multidimensional array it covers every dimension, and for an empty array it is 0.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

AttributeUsageAttribute — rules for custom attributes

AttributeUsageAttribute specifies where a custom attribute may be applied, whether it may be repeated, and whether it is inherited. AttributeTargets.Property restricts its use to properties.

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification