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
Why isn't it being handled properly?
Difference between strcpy() and memcpy() function?
What is a pointer on a pointer in c programming language?
What is structure in c definition?
What is the easiest sorting method to use?
What is include directive in c?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
Is that possible to add pointers to each other?
What is the best way of making my program efficient?
Explain do array subscripts always start with zero?
Do string constants represent numerical values?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
diff between exptected result and requirement?
What is class and object in c?
I need a sort of an approximate strcmp routine?