Operator -: subtraction and negation
Operator - subtracts two values or negates one value; its meaning depends on the operands.
CKTIS / C
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
Operator - subtracts two values or negates one value; its meaning depends on the operands.
The -= operator subtracts the right operand from the left and stores the result, evaluating the expression designating the left object only once.
An asterisk in a declaration specifies that the declared name has a pointer type. The declaration alone does not allocate a pointed-to object.
printf, declared in stdio.h, writes formatted text to stdout. Format specifiers must match the actual argument types passed to the function.
stdout denotes a C program’s standard output stream. Its characters may go to a terminal, a file, or another destination.
stderr is a macro from <stdio.h> identifying the standard diagnostic stream, separate from stdout.
`stdin` from `<stdio.h>` points to the standard input stream. Pass it to input functions; it does not need to be opened first.
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.
A designated initializer selects a structure or union member, or an array element, instead of selecting it solely by its position in the list.
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.
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.
char stores one byte. It is distinct from signed char and unsigned char; its signedness depends on the implementation.
double stores floating-point values; C guarantees neither a 64-bit size nor exact representation of every fraction.
float stores floating-point numbers with limited precision. C does not guarantee a 32-bit representation.
int stores signed integers. Its size depends on the implementation; signed arithmetic overflow has undefined behavior.
int16_t from <stdint.h> names a signed integer type with exactly 16 bits. Its availability depends on the implementation.
int32_t from <stdint.h> names an exactly 32-bit signed integer type without padding bits. Its availability depends on the implementation.
int64_t from <stdint.h> names a signed integer type with exactly 64 bits and no padding bits. Its availability depends on the implementation.
int8_t from <stdint.h> stores integers from -128 to 127. It is an optional type with exactly 8 bits and no padding bits.
An optional signed integer type from <stdint.h> supporting conversion of a valid void* pointer to an integer and back while preserving equality.
long is a signed integer type equivalent to long int. Do not assume that it has exactly 64 bits.
long double is a C real floating type. It includes the values of double but need not provide greater precision.
long long stores large signed integers; its width is not required to be exactly 64 bits.
max_align_t from <stddef.h> represents the greatest fundamental alignment, not a limit on every alignment an implementation supports.