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 are the two types of functions in c?
What is calloc in c?
What are the advantages and disadvantages of c language?
What is the difference between union and anonymous union?
What is class and object in c?
What is zero based addressing?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
Explain how do you sort filenames in a directory?
What is else if ladder?
Explain the use of bit fieild.
What is c language & why it is used?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What is function definition in c?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm