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


Please Help Members By Posting Answers For Below Questions

Explain what are linked list?

631


formula to convert 2500mmh2o into m3/hr

509


Explain how do you print an address?

670


"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks

666


How will you declare an array of three function pointers where each function receives two ints and returns a float?

789






What is the deal on sprintf_s return value?

651


Explain what is the difference between far and near ?

659


What is meant by inheritance?

644


What is the difference between local variable and global variable in c?

699


Does free set pointer to null?

573


How can I list all of the predefined identifiers?

589


Why header files are used?

656


Is a house a shell structure?

704


How can I determine whether a machines byte order is big-endian or little-endian?

632


Explain what is wrong with this statement? Myname = ?robin?;

1059