Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 the difference between the local variable and global variable in c?

1081


Write a c program to demonstrate character and string constants?

2202


Explain what will the preprocessor do for a program?

1075


Explain how can I make sure that my program is the only one accessing a file?

1229


What are keywords in c with examples?

1094


What is sizeof array?

1064


Which is best linux os?

1033


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1096


What are Macros? What are its advantages and disadvantages?

1168


What are control structures? What are the different types?

1099


Explain what happens if you free a pointer twice?

1093


What is difference between far and near pointers?

1060


How can I write a function that takes a format string and a variable number of arguments?

1064


What are global variables?

1201


Explain what is operator promotion?

1093