“imprimir binário em c” Respostas de código

Imprimir binário 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 binário em 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 binário 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);
}

Respostas semelhantes a “imprimir binário em c”

Perguntas semelhantes a “imprimir binário em c”

Mais respostas relacionadas para “imprimir binário em c” em C

Procure respostas de código populares por idioma

Procurar outros idiomas de código