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
When should the register modifier be used? Does it really help?
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
Which are low level languages?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
What is #pragma statements?
What is binary tree in c?
Why header files are used?
What is pass by reference in functions?
How many types of operators are there in c?
what do you mean by inline function in C?
Can we change the value of static variable in c?
How is actual parameter different from the formal parameter?
What is difference between && and & in c?
what is ur strangth & weekness
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.