Write a program that takes a 5 digit number and calculates
2 power that number and prints it(should not use big
integers and exponential functions)
Answer Posted / nitin katakdound
int main(int argc, char *argv)
{
long two_power, five_digit_number;
if(scanf("%ld",&five_digit_number)){
two_power = five_digit_number*five_digit_number;}
printf("\n 2 power of that number is %ld",two_power);
return 0;
}
Is This Answer Correct ? | 13 Yes | 29 No |
Post New Answer View All Answers
What is the difference between int main and void main in c?
Why we not create function inside function.
What is "Hungarian Notation"?
Is it possible to initialize a variable at the time it was declared?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
What is the process to create increment and decrement stamen in c?
What is string function c?
Why is a semicolon (;) put at the end of every program statement?
difference between Low, Middle, High Level languages in c ?
What is meant by int main ()?
Explain how do you determine a file’s attributes?
What is the function of multilevel pointer in c?
How to implement a packet in C
Why is structure padding done in c?
What is difference between function overloading and operator overloading?