Share C code, algorithm implementations, or embedded system snippets: encrypted and shareable without an account.
1#include <stdlib.h>2#include <string.h>34/* Reverse a string in-place. Returns s. */5char *strrev(char *s) {6 if (!s) return NULL;7 size_t len = strlen(s);8 for (size_t i = 0, j = len - 1; i < j; i++, j--) {9 char tmp = s[i];10 s[i] = s[j];11 s[j] = tmp;12 }13 return s;14}1516/* Split str by delim into a NULL-terminated array. Caller frees. */17char **split(const char *str, char delim, size_t *count) {18 size_t n = 1;19 for (const char *p = str; *p; p++) n += (*p == delim);20 char **parts = malloc((n + 1) * sizeof *parts);21 /* ... */22 return parts;23}Paste C code and get a shareable link with full syntax highlighting, server-side rendered with no JavaScript overhead.
Deleted on first open. Can't be viewed twice.
Add a password for end-to-end encryption with no raw key stored.
Set pastes to expire after 1 hour, 1 day, 7 days, or up to 30 days. Gone when you say so.
No sign-up, no email, no ads. Paste and share in seconds.
Yes. The grammar handles C99/C11 features including designated initializers, VLAs, and _Generic.
Yes. Select C as the language and paste your .h file content.
No line limit. Pastes up to 5 MB are supported.