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

Operator -: subtraction and negation

Operator - subtracts two values or negates one value; its meaning depends on the operands.

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

Subtraction assignment (-=)

The -= operator subtracts the right operand from the left and stores the result, evaluating the expression designating the left object only once.

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

Pointer declarations: int *p

An asterisk in a declaration specifies that the declared name has a pointer type. The declaration alone does not allocate a pointed-to object.

Basic · C23
C

printf: formatting standard output

printf, declared in stdio.h, writes formatted text to stdout. Format specifiers must match the actual argument types passed to the function.

Basic · C23
C

stdout: the standard output stream

stdout denotes a C program’s standard output stream. Its characters may go to a terminal, a file, or another destination.

Basic · C23
C

stderr — standard error stream

stderr is a macro from <stdio.h> identifying the standard diagnostic stream, separate from stdout.

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

stdin — standard input stream

`stdin` from `<stdio.h>` points to the standard input stream. Pass it to input functions; it does not need to be opened first.

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

Compound literal

A compound literal exposes an unnamed object through a `(type){ initializers }` expression. Unlike a cast, it yields an lvalue; the object's lifetime depends on its scope and storage-class specifiers.

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

Designated initializer

A designated initializer selects a structure or union member, or an array element, instead of selecting it solely by its position in the list.

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

Variable-length array

A VLA gets its size when its declaration executes but does not subsequently resize. A pointer to a VLA illustrates the broader category of VM types.

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

bool — Boolean type

In C23, bool is a built-in Boolean type. It stores false or true; converting a nonzero number produces true rather than preserving the original value.

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

char — a character integer type

char stores one byte. It is distinct from signed char and unsigned char; its signedness depends on the implementation.

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

double — floating-point type

double stores floating-point values; C guarantees neither a 64-bit size nor exact representation of every fraction.

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

float — floating-point type

float stores floating-point numbers with limited precision. C does not guarantee a 32-bit representation.

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

int — signed integer type

int stores signed integers. Its size depends on the implementation; signed arithmetic overflow has undefined behavior.

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

int32_t — an exactly 32-bit signed integer

int32_t from <stdint.h> names an exactly 32-bit signed integer type without padding bits. Its availability depends on the implementation.

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

int64_t — signed 64-bit integer type

int64_t from <stdint.h> names a signed integer type with exactly 64 bits and no padding bits. Its availability depends on the implementation.

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

int8_t — exactly 8-bit signed integer type

int8_t from <stdint.h> stores integers from -128 to 127. It is an optional type with exactly 8 bits and no padding bits.

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

intptr_t — an integer type for holding pointers

An optional signed integer type from <stdint.h> supporting conversion of a valid void* pointer to an integer and back while preserving equality.

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

The long integer type

long is a signed integer type equivalent to long int. Do not assume that it has exactly 64 bits.

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

The long double type

long double is a C real floating type. It includes the values of double but need not provide greater precision.

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

max_align_t — greatest fundamental alignment

max_align_t from <stddef.h> represents the greatest fundamental alignment, not a limit on every alignment an implementation supports.

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