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 difference b/w extern & volatile variable??

6 Answers   Teleca,


Explain what are reserved words?

0 Answers  


Write a c code segment using a for loop that calculates and prints the sum of the even integers from 2 to 30, inclusive?

4 Answers  


What are the features of c languages?

0 Answers  


Explain what are preprocessor directives?

0 Answers  


How would you print out the data in a binary tree, level by level, starting at the top?

6 Answers   Amazon, Microsoft,


How can I pad a string to a known length?

0 Answers  


what is uses of .net

0 Answers  


What is the output from this program? #include <stdio.h> void do_something(int *thisp, int that) { int the_other; the_other = 5; that = 2 + the_other; *thisp = the_other * that; } int main(void) { int first, second; first = 1; second = 2; do_something(&second, first); printf("%4d%4d\n", first, second); return 0; }

3 Answers  


Consider the following C program. #include <stdio.h> int main() { int i; for (i=0;i<3;++i) { fork();fork(); } } How many processes are created when running this program (including the initial one)? Explain

2 Answers  


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

0 Answers  


Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June

0 Answers  


Categories