/*following is the shortest program that finds whether the entered no. is power of two or not,but i need to add some code(logic) to it.
note:- program do not make use of keywords like if ,while ,for ,switch. */
#include<stdio.h>
void main()
{
int n;
char c[2][23]={"no. is not power of 2","no. is power of 2"};
scanf("%d",&n);
printf("%s",c[/*add code*/]);
}
<< moderator edit: added [co[u][/u]de][/co[u][/u]de]
tags >>
can anyone tell me the code i should write in printf statement so as to know that whether the number is power of 2 or not