write a program to find out number of on bits in a number?
Answer Posted / anilkumar
int n ; \\any number
for(count=0;n&=(n-1); count++);
printf("%d", count);
| Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
What are the 5 types of organizational structures?
How is = symbol different from == symbol in c programming?
how to write a c program to print list of fruits in alpabetical order?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
By using C language input a date into it and if it is right?
What are the different data types in C?
What are extern variables in c?
How many types of operators are there in c?
Do you have any idea how to compare array with pointer in c?
What does sizeof int return?
What is pointer to pointer in c language?
What is c preprocessor mean?
Explain the use of function toupper() with and example code?