Find Index of least significant bit set in an Integer. ex.
int value is say 10001000 results should be 4.
Answer / 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 |
In C, What is the #line used for?
What does int main () mean?
Can we include one C program into another C program if yes how?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
Write a program which returns the first non repetitive character in the string?
What are the Advantages of using macro
Why is python slower than c?
Is it possible to pass an entire structure to functions?
What are the similarities between c and c++?
what is data structure.in linear and non linear data structures which one is better?Explain
develop algorithms to add polynomials (i) in one variable
What does the file stdio.h contain?