Created
May 28, 2020 14:16
-
-
Save Ch-sriram/9171a1a9dad728d37eb95f3f185dfa4f to your computer and use it in GitHub Desktop.
Given Xth & Yth bit positions, WAF to create a number where Xth & Yth bit are set.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int setxy (int x, int y) { | |
return ((1 << x) | (1 << y)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment