What is the most efficient way to count the number of bits which are set in an integer?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

c program to add and delete an element from circular queue using array

3 Answers  


What is the use of #include in c?

0 Answers  


c pgm count no of lines , blanks, tabs in a para(File concept)

2 Answers  


What is the result main() { char c=-64; int i=-32 unsigned int u =-16; if(c>i){ printf("pass1,"); if(c<u) printf("pass2"); else printf("Fail2");} else printf("Fail1); if(i<u) printf("pass2"); else printf("Fail2") } a)Pass1,Pass2 b)Pass1,Fail2 c)Fail1,Pass2 d)Fail1,Fail2 e)none

9 Answers   IBM,


Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage

7 Answers   Accenture,






what is the role you expect in software industry?

0 Answers   HCL,


number 2 plssssss help !!....using array.. turbo c.. create a program that will accept a number and determine if it is a happy number or an unhappy number.. example: enter a number : 7 7*7=49 then 4 and 9 4*4 and 9*9== 16 + 18 gives you 97 then 9 and 7 9*9 and 7*7 == 81 + 49 gives you 130 then 1 and 3 1*1 and 3*3 == 1 + 9 gives you 10 1*1 gives you 1 sample output: 7= 49= 16+81= 97= 81+49=130 =1+9=10 =1 "7 is a happy number" . if the last number is 2 then the number being inputed is not a happy number.

3 Answers  


When should the register modifier be used? Does it really help?

0 Answers  


How can you call a function, given its name as a string?

0 Answers  


What are identifiers in c?

0 Answers  


Here is a good puzzle: how do you write a program which produces its own source code as output?

0 Answers  


What is the difference between Printf(..) and sprint(...) ?

0 Answers   InterGraph,


Categories