Find Index of least significant bit set in an Integer. ex.
int value is say 10001000 results should be 4.
Answer Posted / supri
I think the following code will help!!!!!!
#include<stdio.h>
main()
{
int a,count=0;
scnaf("%d",&a);
while(a)
{
if(a&1==1)
{
printf("%d",++count);
break;
}
a=a>>1;
++Count;
}
return;
}
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What are the benefits of organizational structure?
What is size of union in c?
What is the full form of getch?
Do you know the difference between exit() and _exit() function in c?
find the sum of two matrices and WAP for it.
Why is a semicolon (;) put at the end of every program statement?
What is uint8 in c?
What is difference between far and near pointers?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
how we can make 3d venturing graphics on outer interface
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
Why can't I perform arithmetic on a void* pointer?
What is a wrapper function in c?
What is far pointer in c?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university