Results for “C”
Small, practical examples. Search by task or narrow things down below.
Measure the length of ordinary text
SQLite: Use the engine’s text-length function; this ASCII example has no trailing spaces.
SQLite✓ Tested
Merge two sorted arrays
C: Advance the pointer belonging to the smaller next element and copy any remaining suffix.
C✓ Tested
Move a file to a new filename
C#: File.Move changes the file path without loading its contents.
C#✓ Tested
Move a node without losing its event handler
jQuery: detach retains jQuery data and events for reinsertion.
jQuery✓ Tested
Move overlapping bytes safely
C: memmove supports overlapping ranges, unlike memcpy.
C✓ Tested
Name a meaningful image with alternative text
HTML: Alt supplies an accessible text alternative describing the image’s purpose.
HTML✓ Tested
Name a value that stays fixed
Python: Use a constant declaration or the language’s constant naming convention for a fixed limit.
Python✓ Tested
Name a value that stays fixed
C#: Use a constant declaration or the language’s constant naming convention for a fixed limit.
C#✓ Tested
Name a value that stays fixed
Java: Use a constant declaration or the language’s constant naming convention for a fixed limit.
Java✓ Tested
Name a value that stays fixed
JavaScript: Use a constant declaration or the language’s constant naming convention for a fixed limit.
JavaScript✓ Tested
Name a value that stays fixed
TypeScript: Use a constant declaration or the language’s constant naming convention for a fixed limit.
TypeScript✓ Tested
Name a value that stays fixed
C++: Use a constant declaration or the language’s constant naming convention for a fixed limit.
C++✓ Tested