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

How many types of arrays are there in c?

611


What is wild pointer in c?

629


what is the role you expect in software industry?

1677


Do you know the use of 'auto' keyword?

676


What is the difference between array and pointer?

581






Define and explain about ! Operator?

630


What is a spanning Tree?

975


What are the different properties of variable number of arguments?

675


What are the advantages of using linked list for tree construction?

665


Explain the difference between exit() and _exit() function?

652


Describe explain how arrays can be passed to a user defined function

618


What does c mean before a date?

619


How many data structures are there in c?

631


Are the variables argc and argv are always local to main?

587


What is the sizeof () a pointer?

563