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 ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a pointer in c?

1695


Which is the best website to learn c programming?

1135


What is the correct code to have following output in c using nested for loop?

1121


What is a structure and why it is used?

1294


What is assert and when would I use it?

1065


What is #include stdlib h?

1148


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

2355


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

1291


What is the difference between char array and char pointer?

1121


Explain indirection?

1184


Explain what is wrong with this program statement? Void = 10;

1313


What is the role of && operator in a program code?

1134


What are the advantages of union?

1120


Give differences between - new and malloc() , delete and free() ?

1153


What are the types of i/o functions?

1420