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.
Answers were Sorted based on User's Feedback
Answer / sandeep ambekar
Macro to Set a particular Bit..
#define SetBit(x,y) x | 0x1<<y
Macro to Clear a particular Bit..
#define ClearBit(x,y) x & ~(0x1<<y)
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / ramkumar
int func(int a,int b)
{
int ans;
ans = a - 2^b;
return ans;
}
| Is This Answer Correct ? | 0 Yes | 7 No |
what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means....
What is include directive in c?
Simplify the program segment if X = B then C ← true else C ← false
When do we get logical errors?
how to write a prog in c to convert decimal number into binary by using recursen function,
main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); }
Explain bit masking in c?
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }
How to write a program to receive an integer & find its octal equivalent by using for loop?
Write a c program to Find the name that you entered is male name or female name? Such as Sunjay is name of male and Payal is name of female
what is the difference b/w compiler and debugger?
why effort estimation is important?