What is the most efficient way to count the number of bits
which are set in a value?
Answer Posted / boomer
pseudo
int size is 32 bits...right?
for(i = 0 to 31)
{
count += (value & 1) //& = and oprator
shift left value
}
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What does void main () mean?
Describe the modifier in c?
What is a pointer and how it is initialized?
What is extern variable in c with example?
What are the salient features of c languages?
What are the different file extensions involved when programming in C?
What is a wrapper function in c?
Is array name a pointer?
What is use of #include in c?
Can you please explain the difference between syntax vs logical error?
Explain high-order and low-order bytes.
Where register variables are stored in c?
write a program in c language to print your bio-data on the screen by using functions.