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
How can I do graphics in c?
Describe the steps to insert data into a singly linked list.
What is extern keyword in c?
What is an endless loop?
What is dynamic dispatch in c++?
Multiply an Integer Number by 2 Without Using Multiplication Operator
What will be your course of action for a push operation?
What is the function of volatile in c language?
hi, which software companys will take,if d candidate's % is jst 55%?
What is sizeof c?
Differentiate between Macro and ordinary definition.
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
What do you mean by invalid pointer arithmetic?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
Can an array be an Ivalue?