FIND YOUR NEXT FEW LINES

Results for “EEPROM & program memory”

Small, practical examples. Search by task or narrow things down below.

445 snippets foundClear filters
CDynamic memory & ownership

Initialize a byte buffer to zero

C: memset initializes each byte to the chosen unsigned-char value.

C✓ Tested
CDynamic memory & ownership

Store a variable-length payload after a structure header

C: A flexible array member lets one allocation hold metadata and trailing bytes.

C✓ Tested
CDynamic memory & ownership

Swap owned buffers by swapping their pointers

C: Pointer swaps avoid copying the underlying data.

C✓ Tested
GoFunctions & types

Accept a small behavior interface

Accept a small behavior interface using a complete Go program with explicit sample inputs.

Go✓ Tested
GoFunctions & types

Accept a variable number of arguments

Accept a variable number of arguments using a complete Go program with explicit sample inputs.

Go✓ Tested
RustFunctions & data types

Accept different types with a generic function

Accept different types with a generic function in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Accumulate a result with fold

Accumulate a result with fold in a complete Rust program using the standard library.

Rust✓ Tested
C#Collections & data structures

Add a dictionary entry only if absent

C#: TryAdd reports a duplicate key without replacing its existing value.

C#✓ Tested
C#Data & dates

Add calendar days

Use DateOnly for a date without a time zone in C#.

C#✓ Tested
RustErrors & optional values

Add context to a parsing failure

Add context to a parsing failure in a complete Rust program using the standard library.

Rust✓ Tested
GoDates & times

Advance a calendar date

Advance a calendar date using a complete Go program with explicit sample inputs.

Go✓ Tested
CNumbers & memory

Allocate a zeroed array

Check calloc, use the allocation, and release it in C.

C✓ Tested