Search
 
SCRIPT & CODE EXAMPLE
 

C

Turn on the first n Bits in number

unsigned int set_bits(unsigned int n, unsigned int m) {
unsigned int mask = (1 << m) - 1;
return n | mask;
} 
Comment

PREVIOUS NEXT
Code Example
C :: do while loop in c 
C :: delay in c programming for linux 
C :: square in c 
C :: c memcpy array 
C :: definir função em c 
C :: division en java 
C :: C program to find power of any number 
C :: prime numbers 
C :: read from command line c 
C :: fwrite c 
C :: what is the use of malloc in c 
C :: string in c 
C :: boolean operators in c 
C :: C Syntax of struct 
C :: yt derived field 
C :: how to declare an array of n numbers in c 
C :: data-types 
C :: c program boilerplate 
C :: block quote in lua 
C :: send an array through a pipe 
C :: call cuda kernel from c parameters 
C :: input multipal data types 
C :: djb2 algorithm for C 
C :: denomination counter 
C :: bullseye lxc network problem 
C :: sadsa 
C :: buildCheckFunction(locations) 
C :: what to do after gan training 
C :: i765 OPT filing fees october 2 
C :: how to write a hello world program in c 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =