[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Program Discussion :: Bitwise Operator

Home > Programs > Bitwise Operator

345 / 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: