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 |
if array a conatins 'n' elements and array b conatins 'n-1' elements.array b has all element which are present in array a but one element is missing in array b. find that element.
18 Answers Parexel, Ram Infotech, Zycus Infotech,
define function
What is a const pointer in c?
Is it fine to write void main () or main () in c?
#define MAX 3 main() { printf("MAX = %d \n",MAX ); #undef MAX #ifdef MAX printf("Vector Instituteā); #endif
main difference between c and c++ language
void main() { int a=1; printf("%d %d %d",a,++a,a++); } the output is supposed to be 1 2 2....but it is 3 3 1 this is due to calling conventions of C. if anyone can explain me how it happens?
How many types of errors are there in c language? Explain
What is a symbolic constant?
IS Doon college of Engn.. has good faculty
Famous puzzles which are generally asked by companies during interviews ?
Difference between data structure and data base.
7 Answers CTS, Value Labs, Zoho,