text: Find the remainder when N is divided by 4 using Bitwise AND operator | C implementation to find N modulo 4 using Bitwise AND operator ; Function to find the remainder ; Bitwise AND with 3 ; return x ; Driver code
code: #include <stdio.h> NEW_LINE int findRemainder ( int n ) { int x = n & 3 ; return x ; } int main ( ) { int N = 43 ; int ans = findRemainder ( N ) ; printf ( " % d " , ans ) ; return 0 ; }