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
Explain why c is faster than c++?
What are the restrictions of a modulus operator?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What are the advantages and disadvantages of pointers?
What is pass by reference in c?
Can a file other than a .h file be included with #include?
What are variables and it what way is it different from constants?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
Explain how can a program be made to print the name of a source file where an error occurs?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
What is a macro, and explain how do you use it?
What do header files do?
what type of questions arrive in interview over c programming?
What does c value mean?
What is the basic structure of c?