Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
get_bit
//Title of this code //gcc 4.9.2 #include <stdio.h> int main(void) { int input = 0x1; int N = 1; // Position of the bit you want to extract // Creating the mask unsigned int mask = 1 << (N-1); // Applying the mask unsigned int result = (input & mask) ? 1 : 0; printf("Result after mask: %d\n", result); }
run
|
edit
|
history
|
help
1
Please
log in
to post a comment.
gcc compiler code for delay
qsort para struct
incrementing values in an array
Assignment 5 v2
No Pyramid toggle
USO DEL strrchr()
B_141202_CADENA_NUMERO
FUNCTIONS Shape functions
150109_RecursividadParImpar
Comment.c
Please log in to post a comment.