Write a program that takes a 5 digit number and calculates 2
power
that number and prints it.



Write a program that takes a 5 digit number and calculates 2 power that number and prints it. ..

Answer / 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

More C Interview Questions

Explain what are the advantages and disadvantages of a heap?

0 Answers  


What is new line escape sequence?

0 Answers  


If I want to initialize the array like. int a[5] = {0}; then it gives me all element 0. but if i give int a[5] = {5}; then 5 0 0 0 0 is ans. what will I do for all element 5 5 5 5 5 in a single statement???

3 Answers   Amdocs, IBM,


what is linkage error when it occurs in c program

3 Answers  


What is the acronym for ansi?

0 Answers  






What is maximum size of array in c?

0 Answers  


What is c method?

0 Answers  


program to find middle element of linklist?

1 Answers   Huawei,


Write a C/C++ program that connects to a MySQL server and checks intrusion attempts every 5 minutes. If an intrusion attempt is detected beep the internal speaker to alert the administrator. A high number of aborted connects to MySQL at a point in time may be used as a basis of an intrusion.

2 Answers   Drona Solutions, Infosys, Vodafone, Webyog,


i want to have a program to read a string and print the frequency of each character and it should work in turbo c

3 Answers   Persistent, Wipro,


the operator for exponencation is a.** b.^ c.% d.not available

5 Answers   TCS,


What are the advantages of c language?

0 Answers  


Categories