“Imprimir binario en c” Código de respuesta

Imprimir binaria c

// Note that u can change this function to print int values
// by changing the type and the sizeof 
void print_bin(unsigned char value)
{
    for (int i = sizeof(char) * 7; i >= 0; i--)
        printf("%d", (value & (1 << i)) >> i );
    putc('\n', stdout);
}
Yasha

Imprimir binario en c

void print_bin(unsigned char value)
{
    for (int i = sizeof(char) * 7; i >= 0; i--)
        printf("%d", (value & (1 << i)) >> i );
    putc('\n', stdout);
}
SIVASANJEEV R

Imprimir binaria c

// Note that u can change this function to print int values
// by changing the type and the sizeof
void print_bin(unsigned char value)
{
    for (int i = sizeof(char) * 8; i != -1; i--)
        printf("%d", (value & (1 << i)) >> i );
    putc('\n', stdout);
}

Respuestas similares a “Imprimir binario en c”

Preguntas similares a “Imprimir binario en c”

Más respuestas relacionadas con “Imprimir binario en c” en C

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código