Skip to content

Instantly share code, notes, and snippets.

View rzavalet's full-sized avatar

Ricardo Zavaleta rzavalet

View GitHub Profile
@rzavalet
rzavalet / another_compilation_unit.c
Last active September 10, 2023 23:34
A tale of a weird return value
#include <stdio.h>
void *someFunction(void)
{
void *my_return_value = (void *)0xBADC0FFEE0DDF00D;
printf("[%s, %s:%d] My return value is: %p\n",
__func__, __FILE__, __LINE__, my_return_value);
return my_return_value;
@rzavalet
rzavalet / hash.c
Created July 10, 2016 21:47
Implementación de una Hash Table sencilla
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#define ELEM_HASH 100
/* Esta es nuestra estructura que representa
* a una hash table */
typedef struct HashTable {
int num_elements; /* Número de elementos que podemos almacenar */