Function to find the given number is a power of 2 or not?
Answer Posted / ms
int ispow2(int number)
{
if(n<o) {
return 0;
}
else {
return !(number&(number-1));
}
Is This Answer Correct ? | 76 Yes | 13 No |
Post New Answer View All Answers
Explain how do you determine whether to use a stream function or a low-level function?
Does sprintf put null character?
Explain how to reverse singly link list.
What is the need of structure in c?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
What are data structures in c and how to use them?
What is malloc return c?
What are multidimensional arrays?
Explain what are the standard predefined macros?
What does sizeof function do?
What are the loops in c?
explain what are pointers?
What is const volatile variable in c?
In a switch statement, what will happen if a break statement is omitted?
Why is c used in embedded systems?