4) Write a program that takes a 5 digit number and
calculates 2 power
that number and prints it.
Answer Posted / nitish kumar choudhary
u have to define int as long unsigned int to increase its
size..
normally int cant give u the answer.
void main()
{
long unsigned int res;
int a;
printf("Enter the 5 digit no.: ");
scanf("%d" ,&a);
printf("result is: %uL", a*a);
getch();
}
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
What are the types of assignment statements?
In c language can we compile a program without main() function?
How do I round numbers?
Can include files be nested?
What is the use of define in c?
What is extern variable in c with example?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
Which is an example of a structural homology?
Is stack a keyword in c?
Why is c known as a mother language?
can anyone please tell about the nested interrupts?
What is the benefit of using an enum rather than a #define constant?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What are the 4 data types?
What is the use of ?: Operator?