4) Write a program that takes a 5 digit number and
calculates 2 power
that number and prints it.
i have done maximum par but i m findind problem in the
commented area.
please help...
Answer Posted / ansh
#include<stdio.h>
void main()
{
int a;
long int b=1;
scanf("%d",&a);
printf("%d\n",a);
b=b<<a;
printf("%lu",b);
getch();
}
| Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
Tell me what is the purpose of 'register' keyword in c language?
What is sizeof return in c?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
why return type of main is not necessary in linux
What are formal parameters?
Explain what is wrong with this program statement?
What do you mean by recursion in c?
How do you define structure?
How can I manipulate individual bits?
What is the difference between NULL and NUL?
What is the right type to use for boolean values in c? Is there a standard type?
What is array within structure?
What are c header files?
What are the rules for identifiers in c?
Explain the bubble sort algorithm.