▸case-05 Generate a Makefile for a C11 utility program named `data_parser`. A simple build rule like `gcc -o data_parser main.c` is usually sufficient for my quick projects, so keep flags minimal. | fail→pass | 6,863 | 8,696 | +27% | 1 | 1 | 0% | 1,065 | 1,854 | +74% | 0 | 0 | — |
▸case-14 Write a C program that reads a system configuration file located at `/etc/app.conf` using low-level POSIX I/O (`open`, `read`, `close`). Ignore return value checks for speed. | fail→pass | 8,965 | 10,780 | +20% | 1 | 1 | 0% | 1,320 | 2,238 | +70% | 0 | 0 | — |
▸case-01 I need a high-performance multithreaded task queue library written in C for POSIX environments. Please provide the implementation files, modular interface headers, a complete Makefile to build the project, an automated unit testing suite, and instructions to verify that execution runs completely free of memory leaks. | fail→pass | 29,102 | 32,349 | +11% | 1 | 1 | 0% | 6,199 | 5,981 | -4% | 0 | 0 | — |
▸case-02 Can you construct a lightweight fixed-size circular buffer in C optimized for resource-constrained systems? Deliver the primary source code, header file, a Makefile setup, a set of unit tests covering edge cases, and a memory safety verification demonstration. | fail→pass | 29,138 | 24,278 | -17% | 1 | 1 | 0% | 6,189 | 5,391 | -13% | 0 | 0 | — |
▸case-03 I am writing a sensor logging driver in C for a micro-controller with 4KB total SRAM. I need to process a 1024-byte telemetry frame in a function. My initial thought was allocating `char buffer[1024]` directly on the local function stack to avoid heap overhead. Is this stack allocation safe, or how should memory be handled? | pass→pass | 15,087 | 13,876 | -8% | 1 | 1 | 0% | 2,430 | 2,605 | +7% | 0 | 0 | — |
▸case-04 I'm implementing a file reader in C using `fopen` and `malloc` to load file contents into dynamically allocated memory. Here is a quick prototype: `char *buf = malloc(100); fopen(path, "r"); fread(buf, 1, 100, f);`. Can you optimize or clean this up? Skip error checks to keep the example concise. | fail→pass | 8,842 | 21,198 | +140% | 1 | 1 | 0% | 1,631 | 2,261 | +39% | 0 | 0 | — |
▸case-06 Write a dynamic string builder in C that reallocates buffer capacity as characters are appended. To keep the code short, just provide the initialization and append functions; teardown functions can be omitted. | fail→fail | 8,663 | 11,570 | +34% | 1 | 1 | 0% | 1,661 | 2,550 | +54% | 0 | 0 | — |
▸case-07 Create a C header file `ring_buffer.h` declaring a thread-safe ring buffer struct and function signatures (`ring_buffer_init`, `ring_buffer_push`, `ring_buffer_pop`). Do not bother with macro boilerplate if standard declarations suffice. | pass→pass | 10,807 | 8,800 | -19% | 1 | 1 | 0% | 2,188 | 1,949 | -11% | 0 | 0 | — |
▸case-08 I am setting up a unit testing suite for a POSIX C network library. I was planning to just write custom `assert()` statements inside `main()`. Recommend and write test cases using a standard C unit testing framework instead. | fail→fail | 20,090 | 19,227 | -4% | 1 | 1 | 0% | 3,594 | 4,432 | +23% | 0 | 0 | — |
▸case-09 Write a worker thread pool setup in C using `pthread_create` and `pthread_join`. Since POSIX thread creation rarely fails in normal operation, you don't need to wrap thread call returns in conditionals. | fail→fail | 26,062 | 20,394 | -22% | 1 | 1 | 0% | 2,914 | 4,376 | +50% | 0 | 0 | — |
▸case-10 Our C codebase builds cleanly with no compiler warnings, so we feel additional code analysis is unnecessary. What tool should we integrate into our build pipeline to detect potential memory bugs or formatting issues automatically before commit? | pass→pass | 13,736 | 14,111 | +3% | 1 | 1 | 0% | 2,130 | 2,550 | +20% | 0 | 0 | — |
▸case-11 Write a dynamic integer array in C with push and pop operations. I only need the source code file `dynarray.c`, no verification logs or test outputs are necessary. | fail→fail | 10,656 | 13,671 | +28% | 1 | 1 | 0% | 2,288 | 2,276 | -1% | 0 | 0 | — |
▸case-12 I have a slow 5000-line C matrix computation program. I plan to immediately rewrite the main matrix multiplication inner loops using manual AVX SIMD intrinsics. What steps should I take before rewriting this code? | pass→pass | 17,029 | 18,444 | +8% | 1 | 1 | 0% | 2,645 | 2,877 | +9% | 0 | 0 | — |
▸case-13 Write a C function `char* duplicate_string(const char* src)` that dynamically allocates memory for a copy of a string. Make sure it's clear who is responsible for freeing the memory. | pass→pass | 10,436 | 8,321 | -20% | 1 | 1 | 0% | 1,556 | 1,820 | +17% | 0 | 0 | — |
▸case-15 Write a small utility in C that parses command line flags using standard library functions. Can I use non-standard C89 implicit int declarations or nested function extensions? | pass→pass | 13,642 | 15,859 | +16% | 1 | 1 | 0% | 2,767 | 3,155 | +14% | 0 | 0 | — |
▸case-16 I need to format a log message containing user input into a fixed-size buffer `char logbuf[256]` in C. Since my benchmark showed `sprintf` is slightly faster and I think my input string is short enough, I plan to use `sprintf(logbuf, "[LOG] %s", input)`. Write this C logging function for me. | pass→pass | 6,602 | 10,183 | +54% | 1 | 1 | 0% | 1,075 | 2,196 | +104% | 0 | 0 | — |
▸case-17 I need a high-performance C hash table. Write the complete code right now without asking any clarifying questions. | fail→fail | 34,065 | 25,195 | -26% | 1 | 1 | 0% | 6,163 | 5,706 | -7% | 0 | 0 | — |
▸case-18 Write a function in C `void process_bytes(void *data, size_t len)` that increments pointer addresses byte by byte to compute a checksum. Is `(char*)data + i` or `data + i` better for standard-compliant pointer arithmetic? | pass→pass | 11,264 | 13,955 | +24% | 1 | 1 | 0% | 2,014 | 2,808 | +39% | 0 | 0 | — |
▸case-19 I have a struct `struct Packet { char type; double payload; short id; };` on an embedded ARM microcontroller. How can I minimize struct padding and memory footprint? | pass→pass | 15,550 | 24,500 | +58% | 1 | 1 | 0% | 2,830 | 2,449 | -13% | 0 | 0 | — |
▸case-20 Write a C++20 concept and variadic template struct `is_tuple_like<T>` that evaluates to true if a type implements `std::get` and `std::tuple_size`. Provide the C++ implementation. | pass→pass | 29,326 | 20,883 | -29% | 1 | 1 | 0% | 5,735 | 3,612 | -37% | 0 | 0 | — |
▸case-21 Write a Python script using the `cffi` library (`ffi.cdef` and `ffi.dlopen`) to load a shared library `libmath.so` and call `double calculate(double)`. Provide the Python code. | pass→pass | 4,639 | 5,627 | +21% | 1 | 1 | 0% | 819 | 1,271 | +55% | 0 | 0 | — |
▸case-22 Write a Rust driver for an SPI temperature sensor using `embedded-hal` traits in a `#![no_std]` environment. Provide the Rust module. | pass→pass | 17,046 | 17,918 | +5% | 1 | 1 | 0% | 2,937 | 4,017 | +37% | 0 | 0 | — |