4) Write a program that takes a 5 digit number and
calculates 2 power
that number and prints it.
Answer Posted / 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 |
Post New Answer View All Answers
What is the process to generate random numbers in c programming language?
What is the basic structure of c?
Why array is used in c?
Why is sizeof () an operator and not a function?
what are the 10 different models of writing an addition program in C language?
i got 75% in all semester am i eligible for your company
What are integer variable, floating-point variable and character variable?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
write a program fibonacci series and palindrome program in c
What is main function in c?
What are the types of c language?
What is the difference between single charater constant and string constant?
What is table lookup in c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?