C · 268 KB

Large C file (about 10,000 lines)

1,428 generated functions in about 10,000 lines of valid C, for testing editors, syntax highlighters, linters and diff tools with big files.

CC0 · free for any use · Verified by an independent tool · Report a problem

sample-10000-lines.c — first linesC
/* Generated 10,000-line C file — samplefiles.com */
#include <stddef.h>

double compute_0(const double *values, size_t n) {
    /* Scaled sum for batch 0 */
    double total = 0;
    for (size_t k = 0; k < n; k++) total += values[k] * 0;
    return total;
}

double compute_1(const double *values, size_t n) {
    /* Scaled sum for batch 1 */
    double total = 0;
    for (size_t k = 0; k < n; k++) total += values[k] * 1;
    return total;
}

double compute_2(const double *values, size_t n) {
    /* Scaled sum for batch 2 */
    double total = 0;
    for (size_t k = 0; k < n; k++) total += values[k] * 2;
    return total;
}

double compute_3(const double *values, size_t n) {

File details

Size
268 KB (275,206 bytes)
MIME type
text/x-c
Lines
9,999
SHA-256
9583bcde98e84b2339868e0e5d7c26c35cd87dc75ec6eefdbb22cb84e35f3969
MD5
8738dbacdb816b26ec7642162c73ec45

Download from the command line

curl -L -o sample-10000-lines.c https://files.samplefiles.com/code/c/sample-10000-lines.c

Or check the download in your browser with the checksum calculator.

Same sample in other formats

Python · 213 KBJavaScript · 205 KBJava · 264 KBGo · 167 KBRust · 250 KB

Similar C files

FileSizeDetailsDownload
Sample C filesample.c783 BDownload