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
What is scope rule of function in c?
What are dangling pointers in c?
What is queue in c?
Explain the difference between #include "..." And #include <...> In c?
How can I open a file so that other programs can update it at the same time?
Write a program to print ASCII code for a given digit.
Explain the advantages of using macro in c language?
Do pointers store the address of value or the actual value of a variable?
Explain what are bus errors, memory faults, and core dumps?
How do you define CONSTANT in C?
What is meant by initialization and how we initialize a variable?
What do you understand by normalization of pointers?
What is the purpose of type declarations?
Write a program to use switch statement.
any "C" function by default returns an a) int value b) float value c) char value d) a & b