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 |
#include<stdio.h> #include<conio.h> void main() { clrscr(); int a=0,b=0,c=0; printf("enter value of a,b"); scanf(" %d %d",a,b); c=a+b; printf("sum is %d",c); getch(); }
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
What is pointers in c with example?
Why do we need volatile in c?
write a program to convert a expression in polish notation (postfix) to inline (normal)
Do you know the use of fflush() function?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
#include<std.h> int main() { char *str[]={"Frogs","Do","Not","Die","They","Croak!"}; printf("%d %d\n",sizeof(str),strlen(str)); ...return 0; } what will the output of the above program?
What is enumerated data type in c?
the question is that what you have been doing all these periods (one year gap)
Write a function that will take in a phone number and output all possible alphabetical combinations
Print all numbers which has a certain digit in a certain position eg: number=45687 1 number=4 2 number=5 etc