Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
C++
/
C dynamic memory management
What is guaranteed when realloc(owner, larger_size) returns NULL for a nonzero valid size?
from C dynamic memory management
C23 (GCC 13.3.0)
intermediate
1 min
What is guaranteed when realloc(owner, larger_size) returns NULL for a nonzero valid size?
The old allocation remains valid and unchanged.
The old allocation has already been freed.
The first half of the old allocation remains valid.
The caller must free the NULL result before reusing owner.
Check
Ask AI about this kata
Report an error
previous kata
What does this C23 program print when calloc succeeds?
Predict the output
next kata
Review a generated byte buffer
Review AI code
A new version is available
Reload