Write a program that takes a 5 digit number and calculates
2 power
that number and prints it.
Answer Posted / anusha
#include<stdio.h>
#include<conio.h>
main()
{
unsigned long integer n;
long integer res=1;
int i=1;
clrscr()
printf("please enter 5 digit no:");
scanf("%ld",&n);
for(i=1,i<=n,i++);
{
res=(res*2);
}
printf("Result is %ld",res);
getch();
}
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
Is null always equal to 0(zero)?
difference between object file and executable file
What is restrict keyword in c?
Explain about the functions strcat() and strcmp()?
What is structure and union in c?
What is the process to generate random numbers in c programming language?
How can I generate floating-point random numbers?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
What are header files? What are their uses?
what is event driven software and what is procedural driven software?
Explain the difference between strcpy() and memcpy() function?
Is there anything like an ifdef for typedefs?
Why c is called procedure oriented language?
For what purpose null pointer used?