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

in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?

4 Answers   Infosys, NetApp,


Why is a semicolon (;) put at the end of every program statement?

0 Answers  


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

0 Answers  


main() { int i = 1; int num[] = {1,2,3,4}; num[i] = i++; printf("%d", num[i]); } what will be the output? }

22 Answers   NDS, TCS,


please explain every phase in the "SDLC" in the dotnet.

0 Answers  






what is the meaning of java that is (J A V A) full form of JAVA

71 Answers   AKS University, Bhel, BNL, BPO, HCL, Peacecon,


What is null character in c?

0 Answers  


for questions 14,15,16,17 use the following alternatives:a.int b.char.c.string.d.float

1 Answers  


write a c program that prints all multiples of 3between 1 and 50.

5 Answers  


What is array of pointers to string?

0 Answers  


How many ways are there to swap two numbers without using temporary variable? Give the each logic.

9 Answers  


Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?

1 Answers   Oracle,


Categories