52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2?
Answer Posted / siva jyothi
53:
#include<stdio.h>
main()
{
unsigned int num;
int i=0;
while(num!=0)
{
if(num&1 == 1)
{
i++;
}
num>>=1;
}
printf("number of 1's is:%d\n",i);
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is mean by data types in c?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
Where register variables are stored in c?
What is a method in c?
What is the difference between %d and %i?
How can I remove the leading spaces from a string?
How does struct work in c?
Why does the call char scanf work?
What is string length in c?
How can I find out how much free space is available on disk?
What should malloc() do?
What are the functions to open and close the file in c language?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
how we can make 3d venturing graphics on outer interface
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference