28.2.43 __builtin_popcount

Description

Count the number of 1’s (set bits) in an integer.

Prototype

int __builtin_popcount(unsigned int num);

Argument

num – integer number

Return Value

Returns the number of 1’s found.

Assembler Operator/ Machine Instruction

N/A