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 / sivajyothi katireddi
55:
if(num & (num-1) == 0)
{
printf("num is power of 2\n");
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is difference between main and void main?
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
What are the differences between Structures and Arrays?
Explain what is the most efficient way to store flag values?
Explain the bubble sort algorithm.
What are the advantages of using macro in c language?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Where can I get an ansi-compatible lint?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
How can I read/write structures from/to data files?
Describe dynamic data structure in c programming language?
what are the facialities provided by you after the selection of the student.
Why doesn't C support function overloading?
Describe how arrays can be passed to a user defined function
What are global variables and explain how do you declare them?