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
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
What is difference between array and structure in c?
Is null always defined as 0(zero)?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
Wt are the Buses in C Language
What is sizeof array in c?
What is difference between static and global variable in c?
Not all reserved words are written in lowercase. TRUE or FALSE?
Do pointers take up memory?
Explain how are 16- and 32-bit numbers stored?
What are the 4 types of programming language?
What is string function in c?
What is use of #include in c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
how to capitalise first letter of each word in a given string?