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
what do you mean by inline function in C?
What are the primitive data types in c?
What are different types of pointers?
Why doesnt long int work?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
What are the advantages and disadvantages of pointers?
What is pragma in c?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
Explain modulus operator.
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Explain two-dimensional array.
Explain what is the heap?
What are the types of pointers in c?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.