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
Why flag is used in c?
Where register variables are stored in c?
Why do we use int main instead of void main in c?
What is the difference between volatile and const volatile?
What is a loop?
In c language can we compile a program without main() function?
What is the right way to use errno?
How can I delete a file?
Is it better to use malloc() or calloc()?
How to delete a node from linked list w/o using collectons?
What is a lookup table in c?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent
How can I write functions that take a variable number of arguments?
Dont ansi function prototypes render lint obsolete?