hello Display "Hello World!" followed by a newline | First program | +8 | New | |||
bare_char Display a single newline character on standard output | First program | +8 | New | |||
static_byte Write a program that outputs the letter 'e' followed by a newline | First program | +8 | New | |||
countdown Display all digits in descending order on one line | First program | +8 | New | |||
print_digits void print_digits(void) | First program | +8 | New | |||
putchar libc int putchar(int c) | First program | +8 | New | |||
box Draw the frame of a rectangle whose width and height come from the arguments | First program | +12 | New | |||
puts libc int puts(const char *s) | First program | +12 | New | |||
fix-the-syntax Repair the one syntax error in greet.c without changing what it prints | Read the error | +8 | New | |||
fix-the-prototype Repair a program that calls a function the compiler has not seen yet | Read the error | +8 | New | |||
fix-the-unused int scale(int value, int factor) | Read the error | +12 | New | |||
fix-the-format void print_pair(size_t count, long total) | Read the error | +12 | New | |||
fix-the-warnings int clamp(int v, int lo, int hi) | Read the error | +12 | New | |||
abs_safe long abs_safe(int n) | Types and values | +12 | New | |||
fits_in_int int fits_in_int(long value) | Types and values | +12 | New | |||
cmp_mixed int cmp_mixed(int a, unsigned int b) | Types and values | +16 | New | |||
add_overflows int add_overflows(int a, int b) | Types and values | +16 | New | |||
div_mod_floor void div_mod_floor(int a, int b, int *q, int *r) | Types and values | +16 | New | |||
checked_size int checked_size(size_t n, size_t size, size_t *out) | Types and values | +16 | New | |||
money_format int money_format(long cents, char *out) | Types and values | +16 | New | |||
fizzbuzz Print numbers from 1 to 100 with fizzbuzz rules | Conditions and loops | +12 | New | |||
alpha_pairs Display the alphabet with each letter repeated twice, alternating case per pair | Conditions and loops | +12 | New | |||
alpha_descent Display the alphabet in reverse with case alternating in pairs of two | Conditions and loops | +12 | New | |||
days_in_month int days_in_month(int year, int month) | Conditions and loops | +12 | New | |||
digit_count int digit_count(int n) | Conditions and loops | +12 | New | |||
times_table Display the multiplication table of the given positive integer | Conditions and loops | +16 | New | |||
histogram Draw one bar of '#' per integer argument, one bar per line | Conditions and loops | +16 | New | |||
pyramid Draw a centered pyramid of '#' whose height comes from the argument | Conditions and loops | +12 | New | |||
index_alpha Repeat each letter by its 0-based alphabetical position | Conditions and loops | +16 | New | |||
reverse_print Print a single argument from its last character back to its first | Conditions and loops | +16 | New | |||
arg_count Print how many command-line arguments were provided | Command line | +12 | New | |||
first_arg Print the first command-line argument | Command line | +12 | New | |||
last_arg Print the last command-line argument followed by a newline | Command line | +12 | New | |||
args_rev Print each CLI argument on its own line, starting from the last | Command line | +12 | New | |||
argv_sum Sum all integer arguments and print the result | Command line | +16 | New | |||
exit-status Print the sum of the integer arguments and report every failure through the exit status | Command line | +16 | New | |||
calc Evaluate a simple arithmetic expression passed as three arguments | Command line | +24 | New | |||
max int max(int *tab, unsigned int len) | Functions | +12 | New | |||
gcd Compute and display the greatest common divisor of two strictly positive integers | Functions | +16 | New | |||
lcm unsigned int lcm(unsigned int a, unsigned int b) | Functions | +16 | New | |||
add_prime_sum Compute and print the sum of every prime number from 2 up to the positive integer given as argument | Functions | +16 | New | |||
prime_factors Display the prime factorization of a positive integer | Functions | +24 | New | |||
factorial int factorial(int n) | Recursion | +12 | New | |||
sum_to_n int sum_to_n(int n) | Recursion | +12 | New | |||
digit_sum int digit_sum(int n) | Recursion | +12 | New | |||
power int power(int base, int exp) | Recursion | +12 | New | |||
descend void descend(int n, void (*on_enter)(int), void (*on_leave)(int)) | Recursion | +16 | New | |||
hanoi-moves Print the sequence of moves that solves the Tower of Hanoi for a given disk count | Recursion | +16 | New | |||
lex_permutations Print all permutations of a unique-character string in lexical order | Recursion | +24 | New | |||
queen_boards Print every solution for placing N queens on an N by N board | Recursion | +32 | New | |||
subset_sum_lines Print subsets whose values add up to a requested target | Recursion | +32 | New | |||
swap_int void swap_int(int *a, int *b) | Pointers | +16 | New | |||
swap_str void swap_str(char **a, char **b) | Pointers | +12 | New | |||
skip_spaces const char *skip_spaces(const char *s) | Pointers | +12 | New | |||
sum_range int sum_range(const int *first, const int *last) | Pointers | +12 | New | |||
find_int int *find_int(int *first, int *last, int value) | Pointers | +16 | New | |||
ranges_overlap int ranges_overlap(const void *a, size_t na, const void *b, size_t nb) | Pointers | +16 | New | |||
argsort_len void argsort_len(char **arr, size_t n, size_t *out) | Pointers | +24 | New | |||
int_range int *int_range(int from, int to) | Arrays and matrices | +16 | New | |||
range_desc int *range_desc(int min, int max) | Arrays and matrices | +16 | New | |||
reverse_int void reverse_int(int *a, size_t n) | Arrays and matrices | +12 | New | |||
prefix_sum void prefix_sum(const int *a, size_t n, long *out) | Arrays and matrices | +12 | New | |||
unique_sorted size_t unique_sorted(int *a, size_t n) | Arrays and matrices | +16 | New | |||
row_sums void row_sums(const int (*rows)[4], size_t nrows, int *out) | Arrays and matrices | +16 | New | |||
flood_fill void flood_fill(char **tab, Point size, Point begin) | Arrays and matrices | +24 | New | |||
chess_check Detect whether a chess board configuration puts the King in check | Arrays and matrices | +32 | New | |||
route_loop_length Read points from stdin and print the shortest closed route length | Arrays and matrices | +32 | New | |||
largest_clear_square Mark the largest obstacle-free square in a map read from stdin. | Arrays and matrices | +64 | New | |||
life_board_draw Draw an initial board from stdin, then simulate cellular life. | Arrays and matrices | +64 | New | |||
isalpha libc int isalpha(int c) | Characters and ASCII | +12 | New | |||
isdigit libc int isdigit(int c) | Characters and ASCII | +12 | New | |||
isspace libc int isspace(int c) | Characters and ASCII | +12 | New | |||
toupper libc int toupper(int c) | Characters and ASCII | +12 | New | |||
isalnum libc int isalnum(int c) | Characters and ASCII | +12 | New | |||
isprint libc int isprint(int c) | Characters and ASCII | +12 | New | |||
tolower libc int tolower(int c) | Characters and ASCII | +12 | New | |||
find_n Scan a string argument and print the first 'n' character found | Strings: walking and searching | +12 | New | |||
strlen libc size_t strlen(const char *s) | Strings: walking and searching | +16 | New | |||
write_str void write_str(char *str) | Strings: walking and searching | +16 | New | |||
strchr libc char *strchr(const char *s, int c) | Strings: walking and searching | +16 | New | |||
strcspn libc size_t strcspn(const char *s, const char *reject) | Strings: walking and searching | +16 | New | |||
strstr libc char *strstr(const char *haystack, const char *needle) | Strings: walking and searching | +24 | New | |||
find_last_e Display the last lowercase 'e' found in a string | Strings: walking and searching | +12 | New | |||
strrchr libc char *strrchr(const char *s, int c) | Strings: walking and searching | +16 | New | |||
find_any_char char *find_any_char(const char *text, const char *needles) | Strings: walking and searching | +16 | New | |||
prefix_span size_t prefix_span(const char *text, const char *allowed) | Strings: walking and searching | +16 | New | |||
seq_scan Check if the first string is a case-insensitive ordered subsequence of the second | Strings: walking and searching | +16 | New | |||
subseq_check Check whether the first string is an ordered subsequence of the second, printing yes or no | Strings: walking and searching | +16 | New | |||
longest_palindrome Print the longest palindromic substring contained in a string passed on the command line | Strings: walking and searching | +32 | New | |||
strcpy libc char *strcpy(char *dst, const char *src) | Writing text without overflowing | +16 | New | |||
strcat libc char *strcat(char *dst, const char *src) | Writing text without overflowing | +16 | New | |||
strncpy libc char *strncpy(char *dst, const char *src, size_t n) | Writing text without overflowing | +24 | New | |||
strncat libc char *strncat(char *dst, const char *src, size_t n) | Writing text without overflowing | +24 | New | |||
strcmp libc int strcmp(const char *s1, const char *s2) | Writing text without overflowing | +24 | New | |||
strncmp libc int strncmp(const char *s1, const char *s2, size_t n) | Writing text without overflowing | +24 | New | |||
lead_token Extract and display the leading token from a command-line argument | Words and tokens | +16 | New | |||
clean_words Print the input string with exactly one space between words and no leading or trailing whitespace | Words and tokens | +16 | New | |||
final_token Display the last word of a single string argument | Words and tokens | +24 | New | |||
words_back Output the words of a string in reverse sequence | Words and tokens | +24 | New | |||
wide_words Print a sentence with words separated by a fixed wide gap | Words and tokens | +16 | New | |||
tab_expand Print a string with each space replaced by enough spaces to reach the next 8-column tab stop | Words and tokens | +16 | New | |||
word_shift Rotate the first word of a string to the end of the word sequence | Words and tokens | +24 | New | |||
flip_case Swap the case of every letter in a string and print the result | Transforming text | +16 | New | |||
snake_fmt Convert a camelCase identifier into underscore-separated lowercase | Transforming text | +16 | New | |||
rot_13 Encode a string using the ROT13 substitution cipher | Transforming text | +24 | New | |||
rev_str char *rev_str(char *str) | Transforming text | +24 | New | |||
alpha_fold Mirror lowercase letters to their opposite, leave uppercase unchanged | Transforming text | +24 | New | |||
last_replace Replace only the last occurrence of a character in a string | Transforming text | +16 | New | |||
common_second_order Display characters common to two strings, ordered by their position in the second string | Transforming text | +16 | New | |||
word_title_case Print each argument with the first letter of every word uppercased and the rest lowercased | Transforming text | +16 | New | |||
word_tail_caps Uppercase the last alphabetic character of each word and lowercase the rest | Transforming text | +16 | New | |||
camel_fmt Convert a snake_case identifier into lowerCamelCase format | Transforming text | +16 | New | |||
shift_alpha Advance each letter by one position in the alphabet, wrapping z to a | Transforming text | +24 | New | |||
char_merge Merge two strings printing each unique character once, ordered by the second string then the first | Transforming text | +24 | New | |||
atoi libc int atoi(const char *str) | Numbers and bases | +16 | New | |||
print_hex Convert a non-negative decimal integer to its lowercase hexadecimal form and print it | Numbers and bases | +16 | New | |||
parse_int_base int parse_int_base(const char *str, int base) | Numbers and bases | +16 | New | |||
int_to_str char *int_to_str(int n) | Numbers and bases | +24 | New | |||
int_to_str_base char *int_to_str_base(int value, int base) | Numbers and bases | +24 | New | |||
strtol libc long strtol(const char *str, char **endptr, int base) | Numbers and bases | +32 | New | |||
strdup char *strdup(const char *src) | Dynamic memory | +16 | New | |||
free_str_array size_t free_str_array(char **arr) | Dynamic memory | +16 | New | |||
str_join char *str_join(char **parts, size_t n, char sep) | Dynamic memory | +16 | New | |||
arena_alloc void *arena_alloc(size_t n) | Dynamic memory | +16 | New | |||
heap_alloc void *heap_alloc(size_t n) | Dynamic memory | +32 | New | |||
calloc libc void *calloc(size_t nmemb, size_t size) | Dynamic memory | +24 | New | |||
split char **split(char *str, char *charset) | Dynamic memory | +24 | New | |||
mem_resize libc void *mem_resize(void *ptr, size_t old_size, size_t new_size) | Dynamic memory | +32 | New | |||
memset libc void *memset(void *s, int c, size_t n) | Bytes and raw memory | +16 | New | |||
memcpy libc void *memcpy(void *dst, const void *src, size_t n) | Bytes and raw memory | +16 | New | |||
memmove libc void *memmove(void *dst, const void *src, size_t n) | Bytes and raw memory | +24 | New | |||
hex_dump void *hex_dump(void *addr, unsigned int size) | Bytes and raw memory | +24 | New | |||
memchr libc void *memchr(const void *s, int c, size_t n) | Bytes and raw memory | +16 | New | |||
memcmp libc int memcmp(const void *s1, const void *s2, size_t n) | Bytes and raw memory | +24 | New | |||
index_guard int at_or_default(const int *a, size_t n, long i, int fallback) | Memory safety | +12 | New | |||
divide_guard int safe_div(int a, int b, int *out) | Memory safety | +12 | New | |||
loop_termination size_t count_steps(unsigned int start) | Memory safety | +12 | New | |||
read_the_leak char *build_path(const char *dir, const char *name) | Memory safety | +16 | New | |||
dangling_repair char *build_label(const char *name, int id) | Memory safety | +16 | New | |||
bounded_copy_audit int copy_frame(char *dst, size_t cap, const char *src, size_t announced) | Memory safety | +16 | New | |||
point_distance long point_distance2(point a, point b) | Structs, unions, enums | +12 | New | |||
struct_copy record record_with_id(record src, int id) | Structs, unions, enums | +12 | New | |||
rational_reduce void rational_reduce(rational *r) | Structs, unions, enums | +16 | New | |||
student_stats void student_stats(const student *a, size_t n, stats *out) | Structs, unions, enums | +16 | New | |||
enum_state state next_state(state current, event e) | Structs, unions, enums | +16 | New | |||
struct_pack void record_set(record *dst, long stamp, int id, short code, unsigned char flag) | Structs, unions, enums | +16 | New | |||
header_guard void counter_add(counter *item, int amount) | Headers and the preprocessor | +12 | New | |||
macro_flags unsigned int update_flag(unsigned int value, unsigned int bit, int enabled) | Headers and the preprocessor | +16 | New | |||
opaque_meter meter *meter_create(int initial) | Headers and the preprocessor | +24 | New | |||
list_node_count int list_node_count(ListNode *head) | Linked lists | +16 | New | |||
list_apply void list_apply(ListNode *list, void (*f)(void *)) | Linked lists | +24 | New | |||
list_filter void list_filter(ListNode **begin, void *ref, int (*cmp)(void *, void *)) | Linked lists | +24 | New | |||
detect_cycle int detect_cycle(ListNode *list) | Linked lists | +24 | New | |||
match_brackets Validate that every bracket in each argument is properly opened, closed, and nested | Stacks, queues, trees | +24 | New | |||
rpn Evaluate a Reverse Polish Notation arithmetic expression passed as a single space-separated string | Stacks, queues, trees | +32 | New | |||
expr_tree_eval | Stacks, queues, trees | +32 | New | |||
sort_list ListNode *sort_list(ListNode *lst, int (*cmp)(int, int)) | Generic code | +24 | New | |||
sort_records void sort_records(record *arr, size_t n) | Generic code | +24 | New | |||
qsort libc void qsort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *)) | Generic code | +32 | New | |||
is_power_of_2 int is_power_of_2(unsigned int n) | Bits and representation | +12 | New | |||
show_bits void show_bits(unsigned char byte) | Bits and representation | +16 | New | |||
swap_bits unsigned char swap_bits(unsigned char byte) | Bits and representation | +24 | New | |||
reverse_bits unsigned char reverse_bits(unsigned char byte) | Bits and representation | +24 | New | |||
is_sorted int is_sorted(const int *a, size_t n) | Sorting and searching | +12 | New | |||
sort_array void sort_array(int *tab, unsigned int size) | Sorting and searching | +24 | New | |||
binary_search long binary_search(size_t n, int key, int (*at)(size_t)) | Sorting and searching | +16 | New | |||
insertion_steps void insertion_steps(int *a, size_t n, void (*report)(const int *, size_t)) | Sorting and searching | +16 | New | |||
partition size_t partition(int *a, size_t lo, size_t hi) | Sorting and searching | +16 | New | |||
merge_runs void merge_runs(const int *left, size_t ln, const int *right, size_t rn, int *out) | Sorting and searching | +16 | New | |||
sort_cost unsigned long sort_cost(int *a, size_t n) | Sorting and searching | +16 | New | |||
stream_stats int stream_stats(int fd, size_t *bytes, size_t *lines) | Files and streams | +16 | New | |||
stream_mask Read stdin and mask every non-overlapping occurrence of a given token | Files and streams | +24 | New | |||
line_reader_repair char *read_next_line(int fd) | Files and streams | +32 | New | |||
parse_flags Parse short flags like getopt and report which were enabled and which value followed -p | Parsing and formats | +24 | New | |||
mini_scanf int mini_scanf(const char *format, ...) | Parsing and formats | +32 | New | |||
json_map_parser int parse_json_map(json_node *dst, FILE *stream) | Parsing and formats | +32 | New | |||
brainfuck Interpret a minimalist 8-instruction esoteric language with a 2048-byte memory tape | Parsing and formats | +32 | New | |||
mini_printf libc int mini_printf(const char *format, ...) | Parsing and formats | +32 | New | |||
paren_repair Replace the fewest parentheses with spaces to produce balanced strings | Parsing and formats | +32 | New | |||
process_stream_open int process_stream_open(const char *file, char *const argv[], char mode) | Processes and signals | +32 | New | |||
pipe_chain int pipe_chain(char **cmds[]) | Processes and signals | +32 | New | |||
signal_watchdog int signal_watchdog(void (*fn)(void), unsigned int timeout, bool verbose) | Processes and signals | +32 | New | |||
chat_relay | Processes and signals | +64 | New | |||
is_alpha_palindrome Check palindromes while comparing only letters. | Unassigned | +8 | New | |||
convert_base_digits Convert a non-negative integer string between bases. | Unassigned | +16 | New | |||
big_uint class big_uint | Unassigned | +24 | New | |||
same_character_bag Check whether two strings contain identical character counts. | Unassigned | +24 | New | |||
common_letters Return unique characters from one string that also appear in another. | Unassigned | +12 | New | |||
coord_pair class coord_pair | Unassigned | +24 | New | |||
delimiters_balanced Check whether bracket-like delimiters are correctly paired and nested. | Unassigned | +12 | New | |||
count_digit_steps Count adjacent digit pairs that increase by exactly one. | Unassigned | +12 | New | |||
is_subsequence Check whether one string appears inside another in order. | Unassigned | +12 | New | |||
shift_letters Shift letters by a signed alphabet offset while preserving case. | Unassigned | +16 | New | |||
loose_anagram Compare two strings as anagrams after filtering spaces and case. | Unassigned | +16 | New | |||
py_hello Print a precise greeting from a Python script. | Unassigned | +8 | New | |||
sort_ranked_words Sort strings with a stable multi-key ranking. | Unassigned | +24 | New | |||
rotate_right Rotate a list to the right without changing the input. | Unassigned | +12 | New | |||
mirror_rows Return a copy of a matrix with each row reversed. | Unassigned | +8 | New | |||
merge_sorted_values Merge two already sorted integer lists. | Unassigned | +12 | New | |||
zigzag_letters Alternate letter casing while preserving every non-letter. | Unassigned | +12 | New |