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
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 |
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 |
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 |
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program
What is the difference between volatile and const volatile?
What does & mean in scanf?
What is difference between %d and %i in c?
When is a void pointer used?
what are bit fields in c?
Is a house a shell structure?
Give the logic for this #include<stdio.h> #include<conio.h> void main() { clrscr(); int a=10,b; b=++a + ++a; printf("%d", b); getch(); } Output: 24......How?
in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?
What is the difference between ‘g’ and “g” in C?
Explain how can I write functions that take a variable number of arguments?