How to set binary value to int variable in C

1 Answer

0 votes
#include <stdio.h>

int main(void)
{
    int bin = 0b11111;

    printf("%d\n", bin);

    return 0;
}





/*
run:

31

*/

 



answered Jul 31, 2022 by avibootz

Related questions

1 answer 129 views
1 answer 137 views
1 answer 119 views
1 answer 165 views
1 answer 182 views
1 answer 170 views
1 answer 120 views
...