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

Function to find the given number is a power of 2 or not?

Answer Posted / sheikh rasel

#include<stdio.h>
main()
{
int i;
if(i%2=0)
printf("The given number is a power of 2");
else
printf("The given number is not a power of 2");
return 0;
}

Is This Answer Correct ?    6 Yes 133 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does c have function or method?

1008


What is actual argument?

1067


Explain what are the advantages and disadvantages of a heap?

1094


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1089


For what purpose null pointer used?

1085


When can you use a pointer with a function?

1077


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

3922


What is wild pointer in c with example?

1065


Why do we write return 0 in c?

1069


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3095


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1887


When should a type cast be used?

1019


Why clrscr is used after variable declaration?

1696


What is the role of this pointer?

1076


What is c++ used for today?

1110