write a program to find out number of on bits in a number?

Answer Posted / sriharsha

main()
{
int n;
printf("\n Enter The Number Whose bits have to find");
scanf("%d",&n);
i=i*8;
printf("\n The number of bits in the given number is %d",i);
}

Is This Answer Correct ?    2 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an arrays?

817


Subtract Two Number Without Using Subtraction Operator

554


What are the 4 data types?

754


int far *near * p; means

3286


Explain about the functions strcat() and strcmp()?

775


What is header file definition?

804


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

812


By using C language input a date into it and if it is right?

788


Why is %d used in c?

738


Give basis knowledge of web designing ...

1762


How do you define a function?

768


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

816


How do you print only part of a string?

775


What are the key features in c programming language?

801


Explain what is meant by high-order and low-order bytes?

818