#include <stdio.h>
int main()
{
int a,i;
printf(“enter a number\n”);
scanf(“%d”, &a);
for (i=0;i<=a;i++)
{
a=a/2;
}
if (a%2==0)
printf(“it is power of 2\n”);
else
printf(“it is not\n”);
return 0;
}
#include <stdio.h>
int main()
{
int a,i;
printf(“enter a number\n”);
scanf(“%d”, &a);
for (i=0;i<=a;i++)
{
a=a/2;
}
if (a%2==0)
printf(“it is power of 2\n”);
else
printf(“it is not\n”);
return 0;
}
EmbLogic Research & Competency Development Labs
Phone: +91 9818467776, 8527567776, 9650467776
Email: info@emblogic.com
Copyright © EmbLogic Embedded Technologies Pvt. Ltd.