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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

2586


What is the difference between strcpy() and memcpy() function in c programming?

617


To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9

2178


What is pass by reference in functions?

316


What is use of pointer?

578






What is the total generic pointer type?

715


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

677


What is int main () in c?

617


How to find a missed value, if you want to store 100 values in a 99 sized array?

803


What are the valid places to have keyword “break”?

642


Explain how can I write functions that take a variable number of arguments?

606


What is the purpose of & in scanf?

586


Write a program to generate random numbers in c?

652


Are pointers really faster than arrays?

552


What is the difference between text and binary modes?

637