Given an unsigned integer, find if the number is power of 2?
Answer Posted / veerendra jonnalagadda
main()
{
int i;
printf("Enter Number :");
scanf("%d",&i);
if(i&(i-1))
printf("Not atwo power");
else
printf("Two 's Power");
}
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
what is the role you expect in software industry?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What is typedef struct in c?
c language interview questions & answer
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
code for find determinent of amatrix
Explain how do you use a pointer to a function?
What is a node in c?
what will be maximum number of comparisons when number of elements are given?
Can we use any name in place of argv and argc as command line arguments?
How many parameters should a function have?
How is pointer initialized in c?
What are header files and explain what are its uses in c programming?
What is use of pointer?