M-L Chadwick
12
Q:

built in popcount c++

 __builtin_popcount(n))
1
// C program to illustrate _builtin_popcount(x) 
  
#include <stdio.h> 
int main() 
{ 
    int n = 5; 
      
    printf("Count of 1s in binary of %d is %d ", 
           n, __builtin_popcount(n)); 
    return 0; 
} 
0

New to Communities?

Join the community