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...

Given an unsigned integer, find if the number is power of 2?

Answer Posted / veerendra jonnalagadda

main()
{
int i;
printf("Enter Number :");
scanf("%d",&i);
if(i&(i-1))
printf("Not atwo power");
else
printf("Two 's Power");
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is using exit() the same as using return?

1252


The file stdio.h, what does it contain?

1118


Difference between MAC vs. IP Addressing

1100


What is volatile c?

961


What are run-time errors?

1058


What is the method to save data in stack data structure type?

1037


What’s the special use of UNIONS?

1110


What is the difference between abs() and fabs() functions?

1062


What is difference between stdio h and conio h?

1327


What is the significance of scope resolution operator?

1349


Write a Program to accept different goods with the number, price and date of purchase and display them

6150


swap 2 numbers without using third variable?

1086


What is the use of function in c?

1145


Write a program to print factorial of given number using recursion?

964


Why is structure padding done in c?

1074