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 ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of void pointer?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
What functions are used for dynamic memory allocation in c language?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
What is pivot in c?
What is volatile keyword in c?
what will be the output for the following main() { printf("hi" "hello"); }
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
Do you know the use of 'auto' keyword?
Is r written in c?
How can I write a function that takes a format string and a variable number of arguments?
What is return in c programming?
What is the value of c?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.