C

Share C code online.

Share C code, algorithm implementations, or embedded system snippets: encrypted and shareable without an account.

textdrop.sh/xk4mR2
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}
Every paste includes

C syntax highlighting

Paste C code and get a shareable link with full syntax highlighting, server-side rendered with no JavaScript overhead.

Burn after read

Deleted on first open. Can't be viewed twice.

Password protection

Add a password for end-to-end encryption with no raw key stored.

Configurable expiry

Set pastes to expire after 1 hour, 1 day, 7 days, or up to 30 days. Gone when you say so.

No account needed

No sign-up, no email, no ads. Paste and share in seconds.

How it works
Plain Text
Markdown
Code
DB_HOST=db-01.prod.internal
DB_USER=api_svc
DB_PASS=xK9$mP2!qR7nLw2
REDIS_URL=redis://:abc@cache:6379
delete after setup — expires 1hr
7 days
Share
textdrop.sh/
7 days · plain text
Use cases
  • 01Share algorithm implementations
  • 02Send embedded system code snippets
  • 03Share data structure implementations
  • 04Distribute OS-level utility functions
  • 05Send memory management examples
FAQ
Does the C highlighter support C99 and C11 syntax?+

Yes. The grammar handles C99/C11 features including designated initializers, VLAs, and _Generic.

Can I share C header files?+

Yes. Select C as the language and paste your .h file content.

Is there a line limit?+

No line limit. Pastes up to 5 MB are supported.

Other languages
Drop your code