Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

Program Discussion :: Bitwise Operator

Home > Programs > Bitwise Operator

15 / 15

Write an efficient program to toggle the bits in the given range

Answer:

#include 

int main()
{
int z = 50;
setUnsitBit(z, 2,4);
}

void setUnsitBit(int y,int l, int m)
{
    int i;
   i=(l>m)?m-1:l-1;
   m = (m>l) ?m:l;
for (;i 

Asked In ::

Post Your Answer Here:

Language:

Post Your Reply Here: