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

Answers were Sorted based on User's Feedback



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

Answer / chinmayee

no the program should not be that because the qs is 2 power
that 5 digit number

Is This Answer Correct ?    3 Yes 1 No

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

Answer / deepshree sinha

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int n,m
printf("enter any five digit number");
scanf("%d ",&n);
m=pow(2,n);
printf("m=%d",m);
getch();
}

Is This Answer Correct ?    5 Yes 4 No

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

Answer / manojpadhi04

please inform me the answer

Is This Answer Correct ?    3 Yes 6 No

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

Answer / nitish kumar choudhary

u have to define int as long unsigned int to increase its
size..
normally int cant give u the answer.

void main()
{
long unsigned int res;
int a;
printf("Enter the 5 digit no.: ");
scanf("%d" ,&a);
printf("result is: %uL", a*a);
getch();
}

Is This Answer Correct ?    3 Yes 6 No

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

Answer / sathishmani

#include<stdio.h>
#include<conio.h>
void main()
{
int a;
a=12345;
printf("\n The Result is ",a*a);
getch();
}

Is This Answer Correct ?    6 Yes 18 No

Post New Answer

More C Interview Questions

How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

0 Answers  


why Language C is plateform dependent

3 Answers   Siemens, Wipro,


What is getche() function?

0 Answers  


What is calloc in c?

0 Answers  


What is the difference between variable declaration and variable definition in c?

0 Answers  






Can you apply link and association interchangeably?

0 Answers   InterGraph,


write a function to swap an array a[5] elements like a[0] as a[5],a[1] as a[4],....a[5] as a[0].without using more than one loop and use one array not to use temp array?

1 Answers   Zensar,


Tell me the use of bit field in c language?

0 Answers  


What is main function in c?

0 Answers  


explain what is a newline escape sequence?

0 Answers  


can we declare a variable in different scopes with different data types? answer in detail

3 Answers   TCS,


What is #define?

0 Answers  


Categories