Loading...
Preparing your coding drills
Comprehensive reference for 29 C methods across 5 categories.
strlen
Returns the length of a null-terminated string.
strcpy
Copies a string from source to destination.
strncpy
Copies at most n characters from source to destination.
strcat
Appends source string to destination.
strcmp
Compares two strings lexicographically.
strncmp
Compares at most n characters of two strings.
strchr
Finds first occurrence of a character in a string.
strrchr
Finds last occurrence of a character in a string.
strstr
Finds first occurrence of substring.
strtok
Tokenizes a string using delimiter characters.
memcpy
Copies n bytes from source to destination.
memmove
Copies n bytes, handles overlapping regions safely.
memset
Fills n bytes of memory with a value.
memcmp
Compares n bytes of two memory regions.
malloc
Allocates size bytes of uninitialized memory.
calloc
Allocates memory for an array and initializes to zero.
realloc
Resizes a previously allocated memory block.
free
Deallocates memory previously allocated.
atoi
Converts string to integer.
strtol
Converts string to long with error detection.
qsort
Sorts an array using quicksort.
bsearch
Binary search in a sorted array.
abs
Returns absolute value of integer.
rand
Returns a pseudo-random integer.
srand
Seeds the random number generator.
printf
Prints formatted output to stdout.
sprintf
Prints formatted output to a string buffer.
scanf
Reads formatted input from stdin.
fgets
Reads a line from a stream into a buffer.