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

Can you apply link and association interchangeably?

0 Answers   InterGraph,


when i declare as: void main() { clrscr(); int a=10; printf("%d",a) } my problem that why generate a error in above programs. please tell me answer seriously .

4 Answers  


difference between string and array?

6 Answers  


Why can’t constant values be used to define an array’s initial size?

0 Answers  


What is the diffrent between while and do while statement ?

6 Answers  


Explain what is #line used for?

0 Answers  


long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes

18 Answers   Acropolis, HCL, Intel, TCS,


what is the purpose of the following code, and is there any problem with the code? void fn(long* p1, long* p2) { register int x = *p1; register int y = *p2; x ^= y; y ^= x; x ^= y; *p1 = x; *p2 = y; }

1 Answers   Google,


Are comments included during the compilation stage and placed in the EXE file as well?

0 Answers  


How do we open a binary file in Read/Write mode in C?

0 Answers   Alter,


Apart from dennis ritchie who the other person who contributed in design of c language.

0 Answers  


what does data structure mean?

8 Answers  


Categories