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
/* 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
Download from the command line
curl -L -o sample-10000-lines.c https://files.samplefiles.com/code/c/sample-10000-lines.cwget https://files.samplefiles.com/code/c/sample-10000-lines.chttps://files.samplefiles.com/code/c/sample-10000-lines.cprintf '%s %s\n' 9583bcde98e84b2339868e0e5d7c26c35cd87dc75ec6eefdbb22cb84e35f3969 sample-10000-lines.c | shasum -a 256 -cOr 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
| File | Size | Details | Download |
|---|---|---|---|
| Sample C filesample.c | 783 B | Download |