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 |
Is c still used?
What does static variable mean in c?
How can I change their mode to binary?
how to print "hai" in c?
Explain which function in c can be used to append a string to another string?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
7 Answers Accenture, Gridco, IBM, Kevin IT, TCS, Vimukti Technologies,
what are the advantages & disadvantages of unions?
What does *p++ do?
Why c is a procedural language?
Explain the difference between strcpy() and memcpy() function?
Write a program to find the number of times that a given word(i.e. a short string) occurs in a sentence (i.e. a long string!). Read data from standard input. The first line is a single word, which is followed by general text on the second line. Read both up to a newline character, and insert a terminating null before processing. Typical output should be: The word is "the". The sentence is "the cat sat on the mat". The word occurs 2 times.
What are terms in math?