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 |
What is size of union in c?
what is a void pointer?
What do you mean by keywords in c?
what are bit fields? What is the use of bit fields in a structure declaration?
0 Answers Flextronics, TISL, Virtusa,
Table of Sudoku n*n
what does " calloc" do?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
Why data types in all programming languages have some range? Why ritche have disigned first time likethat?Why not a single data type can support all other types?
Explain main function in c?
Between macros and functions,which is better to use and why?
Is there a built-in function in C that can be used for sorting data?
Explain the use of keyword 'register' with respect to variables.