Skip to content

Instantly share code, notes, and snippets.

@eduard93
eduard93 / DumpHex.c
Created January 17, 2019 17:32 — forked from ccbrown/DumpHex.c
Compact C Hex Dump Function w/ASCII
#include <stdio.h>
char* DumpHex2(const void* data, size_t size) {
const int symbolSize = 100;
char* buffer = calloc(10*size, sizeof(char));
char* symbol = calloc(symbolSize, sizeof(char));
char ascii[17];
size_t i, j;
ascii[16] = '\0';