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 actual argument?

1100


Tell us something about keyword 'auto'.

1109


How can my program discover the complete pathname to the executable from which it was invoked?

1117


What is the total generic pointer type?

1211


write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.

2573


What is data structure in c programming?

1129


What are header files and what are its uses in C programming?

1334


What are register variables in c?

1049


Explain bitwise shift operators?

1316


what is the format specifier for printing a pointer value?

1073


What is the difference between formatted&unformatted i/o functions?

1105


Is c procedural or object oriented?

1085


What is the scope of static variable in c?

1078


What are structure types in C?

1153


What are the 32 keywords in c?

1140