Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Standard C Library Functionsffs(3C)


NAME

 ffs - find first set bit

SYNOPSIS

 
#include <strings.h>
int ffs(const int i);

DESCRIPTION

 

The ffs() function finds the first bit set (beginning with the least significant bit) and returns the index of that bit. Bits are numbered starting at one (the least significant bit).

RETURN VALUES

 

The ffs() function returns the index of the first bit set. If i is 0, then ffs() returns 0.

ERRORS

 

No errors are defined.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

attributes(5)


SunOS 5.9Go To TopLast Changed 29 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.