Answer Posted / om
int f(int num)
{
if(( num>0) && (!(num & (num-1))) )
return 1;
else
return 0;
}
// f(16)...... 16 & 15 = 10000 & 01111 =00000
f(4) ...... 4 & 3 =0100 & 0111 =0000
f(11).......11 & 10 = 1011 & 1010 = 1010 so not...
f(12).......12 & 11 = 1100 & 1011 = 1000 so not...
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
What is the mean of function?
What is the size of structure pointer in c?
What is a global variable in c?
What is the difference between a string and an array?
What are external variables in c?
Explain what are linked list?
swap 2 numbers without using third variable?
What is scope and lifetime of a variable in c?
Write a c program to demonstrate character and string constants?
Can you please explain the scope of static variables?
What is static memory allocation? Explain
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
Explain can you assign a different address to an array tag?
What is a structure member in c?