write a c/c++ program that takes a 5 digit number and
calculates 2 power that number and prints it?
Answer Posted / sudarshan
#include<stdio.h>
void main()
{
int a,b;
scanf("%d",&a);
b=a*a;
printf("%d",b);
getch();
}
| Is This Answer Correct ? | 6 Yes | 7 No |
Post New Answer View All Answers
How can a process change an environment variable in its caller?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
Why do we use main function?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
What is the use of function in c?
What is c basic?
What are dangling pointers in c?
How to compare array with pointer in c?
Is there sort function in c?
code for quick sort?
What are the basic data types associated with c?
How can I pad a string to a known length?
Explain what is a program flowchart and explain how does it help in writing a program?
What is function prototype in c with example?
What is a null string in c?