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 / s.shanmugam24

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main(void)
{
int power,i;
i=2;
clrscr();
printf("enter the power values");
scanf("%d",&power);
i=pow(power);
printf("the power is",i);
}

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More C Interview Questions

What is the use of static variable in c?

0 Answers  


write a c program that if the given number is prime, and their rearrangement(permute) of that number is also prime. Ex: Input is "197" is prime Output: 791,917,179 is also prime. Please any one tell me tha code for that

3 Answers  


What is function and its example?

0 Answers  


How does #define work?

0 Answers  


2. What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value

3 Answers   Accenture,






Write a program to find factorial of a number using recursive function.

0 Answers   Global Logic, TCS,


#include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); } what is the output for this?

4 Answers   IIIT,


about c language

0 Answers  


Why is main function so important?

0 Answers  


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

0 Answers   HP,


What is difference between structure and union?

0 Answers  


Explain that why C is procedural?

0 Answers   Maveric, Verifone,


Categories