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 |
wat are the two methods for swapping two numbers without using temp variable??
How can I discover how many arguments a function was actually called with?
What is stack in c?
using for loop sum 2 number of any 4 digit number in c language
int a=0,b=2; if (a=0) b=0; else b=*10; What is the value of b ?
What is the output for the following program #include<stdio.h> main() { char a[5][5],flag; a[0][0]='A'; flag=((a==*a)&&(*a==a[0])); printf("%d\n",flag); }
A array contains dissimilar element how can we count, and A array contains dissimilar element how can we store in another array with out repetition.
Write a program that receives as input a number omaadel-n-print, four digits.
What extern c means?
What is calloc in c?
What are the characteristics of arrays in c?
Tell us something about keyword 'auto'.