Function to find the given number is a power of 2 or not?
Answer Posted / sheikh rasel
#include<stdio.h>
main()
{
int i;
if(i%2=0)
printf("The given number is a power of 2");
else
printf("The given number is not a power of 2");
return 0;
}
Is This Answer Correct ? | 6 Yes | 133 No |
Post New Answer View All Answers
What does typedef struct mean?
Differentiate between Macro and ordinary definition.
In C language what is a 'dangling pointer'?
Explain what is the stack?
Differentiate between full, complete & perfect binary trees.
How can you increase the allowable number of simultaneously open files?
Is c call by value?
What is the difference between strcpy() and memcpy() function in c programming?
Why n++ execute faster than n+1 ?
What is the size of empty structure in c?
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
How many identifiers are there in c?
Can we declare function inside main?
How can you increase the size of a statically allocated array?
Explain about block scope in c?