Write a program that takes a 5 digit number and calculates 2
power
that number and prints it.
Answer Posted / aravind
#include<stdio.h>
#include<math.h> /*I am not sure whether this lib fun is gud*/
int main()
{
int num=12345,result;
result=pow(12345,2);
printf("result=%d",result);
}
Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
What's a good way to check for "close enough" floating-point equality?
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
How can I automatically locate a programs configuration files in the same directory as the executable?
What is the best style for code layout in c?
What is structure pointer in c?
how do you execute a c program in unix.
Define circular linked list.
Do variables need to be initialized?
Explain what is the difference between functions getch() and getche()?
What is the stack in c?
Can the size of an array be declared at runtime?
Why is sizeof () an operator and not a function?
What is adt in c programming?
Why header file is used in c?
How is a pointer variable declared?