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
List the difference between a 'copy constructor' and a 'assignment operator' in C?
How can I find the modification date of a file?
What are categories used for in c?
Why main is used in c?
What is a c token and types of c tokens?
Which is best linux os?
What is difference between Structure and Unions?
What are the types of i/o functions?
please give me some tips for the placement in the TCS.
What are the 5 types of organizational structures?
Write a program to swap two numbers without using a temporary variable?
What are the different properties of variable number of arguments?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What is the difference between call by value and call by reference in c?
What are header files in c?