Write a program that takes a 5 digit number and calculates 2
power that number and prints it

Answer Posted / subhashini

void main()
{


long int n,x;
clrscr();
printf(" Enter 5 digit number:");
scanf("%d",&n);
x=2^n;
printf("result: %d",x);
getch();
}

Is This Answer Correct ?    1 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is ur strangth & weekness

1826


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

568


How can I dynamically allocate arrays?

601


What is static volatile in c?

580


What is a far pointer in c?

601






Why pointers are used?

634


program for reversing a selected line word by word when multiple lines are given without using strrev

1951


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

738


what will be the output for the following main() { printf("hi" "hello"); }

9348


When a c file is executed there are many files that are automatically opened what are they files?

598


Explain what is the use of a semicolon (;) at the end of every program statement?

740


What are the characteristics of arrays in c?

617


What is || operator and how does it function in a program?

635


Are pointers integer?

554


Implement bit Array in C.

680