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 of variable in c?
What is structure in c definition?
What are high level languages like C and FORTRAN also known as?
What is quick sort in c?
How many types of errors are there in c language? Explain
What is difference between constant pointer and constant variable?
What is the explanation for cyclic nature of data types in c?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
What is strcpy() function?
What is the purpose of void in c?
Can i use “int” data type to store the value 32768? Why?
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
What is calloc malloc realloc in c?
What is wild pointer in c with example?
What are the 5 types of inheritance in c ++?