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
What is the difference between the local variable and global variable in c?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What is omp_num_threads?
What is fflush() function?
Explain what does a function declared as pascal do differently?
what is the structure pointer?
What's the total generic pointer type?
Is there sort function in c?
What are runtime error?
Explain how do you search data in a data file using random access method?
Write a program of advanced Fibonacci series.
What are all different types of pointers in c?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
How can I discover how many arguments a function was actually called with?
Explain how can I make sure that my program is the only one accessing a file?