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 |
Explain what is a pragma?
What is the use of a ‘’ character?
Is c object oriented?
What is pre-emptive data structure and explain it with example?
How was c created?
Is there a built-in function in C that can be used for sorting data?
What is an lvalue?
Write a program to add a given duration with time(24hrs format)
What is a macro?
What is the argument of a function in c?
write an algorithm which can find the largest number among the given list using binary search ............... this was asked in the interview
2 Answers Satyam, UNIS, Wipro,
What is hash table in c?