Write a function that accepts two numbers,say a and b and
makes bth bit of a to 0.No other bits of a should get
changed.

Answer Posted / ramkumar

int func(int a,int b)
{
int ans;
ans = a - 2^b;
return ans;
}

Is This Answer Correct ?    0 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to print factorial of given number without using recursion?

569


Tell me with an example the self-referential structure?

566


Do you know the difference between malloc() and calloc() function?

616


What is the difference between class and object in c?

583


What are the advantages of using Unions?

642






Can include files be nested? How many levels deep can include files be nested?

660


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

981


Why do we need volatile in c?

749


How can a program be made to print the name of a source file where an error occurs?

731


Should a function contain a return statement if it does not return a value?

599


Explain how can I manipulate strings of multibyte characters?

784


What tq means in chat?

582


Tell me the use of bit field in c language?

630


What are the keywords in c?

643


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

713