How to calculate the number of bits in int data type with C

1 Answer

0 votes
#include <stdio.h>

#define INT_SIZE sizeof(int) * 8 
  
int main()
{
	printf("%d\n", (int)INT_SIZE);

    return 0;
}
  
  
  
/*
run:
  
32
  
*/

 



answered Jul 5, 2020 by avibootz

Related questions

1 answer 184 views
1 answer 157 views
1 answer 175 views
1 answer 140 views
...