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


Please Help Members By Posting Answers For Below Questions

What's a good way to check for "close enough" floating-point equality?

630


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?

985


How can I automatically locate a programs configuration files in the same directory as the executable?

634


What is the best style for code layout in c?

634


What is structure pointer in c?

577






how do you execute a c program in unix.

641


Define circular linked list.

573


Do variables need to be initialized?

623


Explain what is the difference between functions getch() and getche()?

612


What is the stack in c?

723


Can the size of an array be declared at runtime?

614


Why is sizeof () an operator and not a function?

593


What is adt in c programming?

614


Why header file is used in c?

582


How is a pointer variable declared?

596