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

What is queue in c?

1110


What is the Purpose of 'extern' keyword in a function declaration?

1085


What is graph in c?

1064


Can you please explain the difference between strcpy() and memcpy() function?

1078


What is string concatenation in c?

1095


Explain how do you sort filenames in a directory?

1044


How will you find a duplicate number in a array without negating the nos ?

2138


What type of function is main ()?

1047


Can one function call another?

1120


What are the standard predefined macros?

1149


What is bubble sort in c?

1058


Why can arithmetic operations not be performed on void pointers?

1049


Why is it usually a bad idea to use gets()? Suggest a workaround.

1795


What are the header files used in c language?

1056


Explain what is meant by high-order and low-order bytes?

1053