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
write a program in c language to print your bio-data on the screen by using functions.
Write a program to generate the Fibinocci Series
all c language question
What is function prototype?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
Can a program have two main functions?
Who is the main contributor in designing the c language after dennis ritchie?
Explain how can I convert a string to a number?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What is dynamic variable in c?
explain how do you use macro?
How old is c programming language?
Explain what is the use of a semicolon (;) at the end of every program statement?
Why are algorithms important in c program?