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 / amogh
53.
'num' is 32 bit integer
count=0;
for(;num!=0;count++)
num&=num-1;
55.
if(num&(num -1) == 0)
printf("%d is power of 2",num);
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
What is a structural principle?
how could explain about job profile
In c language can we compile a program without main() function?
Explain what are bus errors, memory faults, and core dumps?
What is context in c?
Explain why can’t constant values be used to define an array’s initial size?
what is the diffrenet bettwen HTTP and internet protocol
What is the use of c language in real life?
What is c value paradox explain?
What is meant by gets in c?
What is difference between structure and union with example?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What is the difference between typedef struct and struct?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What functions are used in dynamic memory allocation in c?