Bitwise operator in c program. Hacker rank problem.
#include < stdio.h > #include <string.h> #include <math.h> #include <stdlib.h> //Complete the following function. void calculate_the_maximum(int n, int k) { int maxand =0; int maxor =0; int maxxor =0; for(int i=1; i<=n; i++){ for (int j= i+1; j<=n; j++){ if(((i & j)> maxand) && ((i&j)<k)){ maxand= i&j; } ...