/* * prueba_ver_binario.c * * Created on: 5 abr. 2018 * Author: alcarraz */ #include #include #include "bits.h" #include #define NPRUEBAS 17 #define BUFF_SIZE (NPRUEBAS + 1) int main() { char buffer[BUFF_SIZE]; char *esperados[] = { "", "0", "01", "011", "0010", "01010", "001000", "1010111", "01111100", "001111010", "1001011010", "10001100101", "110100101010", "1100100100010", "10111110011010", "001110010111011", "0000000100011110" }; unsigned int entradas[] = { 0b1010110111111111, 0b1100110110011000, 0b1110100101011101, 0b1110111010010011, 0b1001111100010010, 0b0111101000001010, 0b1100111100001000, 0b1100011001010111, 0b1101011101111100, 0b1010111001111010, 0b1101011001011010, 0b0000110001100101, 0b1111110100101010, 0b0011100100100010, 0b0010111110011010, 0b0001110010111011, 0b0000000100011110 }; /*nombre de archivo temporal*/ char * tmpfname = tmpnam(NULL); int nb, aciertos=0; for(nb=0; nb