Skip to content

Instantly share code, notes, and snippets.

View fishBone000's full-sized avatar

F.B. fishBone000

View GitHub Profile
#include<stdio.h>
#include<stdlib.h>
#define MAX 4096
int h2d(char *p){
int result = 0;
for(int i = 1; i > -1; i--){
if(*p >= '0' && *p <= '9')
result += (*p - '0')*(i?16:1);
else if(*p >= 'a' && *p <= 'f')