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
Write a program on swapping (100, 50)
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
What does p mean in physics?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
what is bit rate & baud rate? plz give wave forms
please give me some tips for the placement in the TCS.
Can you apply link and association interchangeably?
Explain is it valid to address one element beyond the end of an array?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
What is getch c?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
how to create duplicate link list using C???
What is the equivalent code of the following statement in WHILE LOOP format?
how to find binary of number?
What is a double c?