Skip to content

Instantly share code, notes, and snippets.

View Jose-Carlos-Jimenez's full-sized avatar
🎮

Jose Carlos Jimenez Jose-Carlos-Jimenez

🎮
View GitHub Profile
@lesovsky
lesovsky / append-strings-with-snprintf.c
Created July 15, 2016 18:52
How-to append strings using snprintf (without strcat/strncat).
#include <stdio.h>
#include <string.h>
#define LOC_MAXLEN 13
int main (void)
{
char dest[LOC_MAXLEN];
snprintf(dest, LOC_MAXLEN, "%s%s", "abc", "def");