All pastes #8951 Raw Edit

Something

public c v1 · immutable
#8951 ·published 2005-04-06 19:17 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>char* int2hex(int n) {        static char buffer[256];        snprintf(buffer, sizeof buffer, "0x%x", n);        return buffer;}int main() {        int values[] = {0x10, 0x20, 0x25,0x30};        int i;        for(i=0; i<sizeof values / sizeof *values; i++) {                int value = values[i];                printf("El hexadecimal de %d es %s\n",value, int2hex(value) );        }        return 0;}