Write a program that takes a 5 digit number and calculates
2 power
that number and prints it.
Answer Posted / usha
#include<stdio.h>
void main()
{
unsigned long int s=1;
int n;
scanf("%d%d",&n);
for(int i=0; i<n; i++)
{
s=s*2;
}
printf("result %ld",s);
getch();
}
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
Explain how can you avoid including a header more than once?
Write a program to print fibonacci series using recursion?
What is the use of header?
what is use of malloc and calloc?
Can you mix old-style and new-style function syntax?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
Is that possible to store 32768 in an int data type variable?
What is structure packing in c?
Explain what are the standard predefined macros?
define string ?
"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 is c language and why we use it?
Why c is called procedure oriented language?
in linking some of os executables are linking name some of them
What is the difference between union and structure in c?