Name
bit_set
Synopsis
void bit_set(unsigned char *bits
, intpos
, intstate
);
Return Value
None.
Description
Sets the state of the bit at position
pos
in the buffer
bits
to the value specified by
state
. The leftmost position in the
buffer is 0. The state must be 1 or 0.
Complexity
O (1)
Get Mastering Algorithms with C now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.