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
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
while initialization of array why we use a[][2] why not a[2][]...?
What is meant by recursion?
What tq means in chat?
Can we declare function inside main?
What is optimization in c?
What are all different types of pointers in c?
What is the description for syntax errors?
Write a program of advanced Fibonacci series.
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
Explain the properties of union.
What does 3 mean in texting?
Where local variables are stored in c?
What is else if ladder?
What are the types of type qualifiers in c?