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

What is a sequential access file?

0 Answers  


How many levels of pointers have?

0 Answers  


Do you know the use of 'auto' keyword?

0 Answers  


What are pointers? What are different types of pointers?

0 Answers   Fidelity,


Can I initialize unions?

0 Answers  






what is the syallabus of computer science students in group- 1?

0 Answers  


a=(1,2,3); b=1,2,3; c=1,(2,3); d=(1,2),3; what's the value of 'a','b','c','d'

2 Answers  


Write an algorithm for a program that receives an integer as input and outputs the product of of its digits. E.g. 1234 = 24, 705 = 0

4 Answers  


What is data types?

0 Answers  


What are the ways to a null pointer can use in c programming language?

0 Answers  


while initialization of array why we use a[][2] why not a[2][]...?

0 Answers   Aptech,


#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),sizeof(3)); }

4 Answers   HCL,


Categories