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 the use of c language in real life?

527


Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

603


Explain how can you check to see whether a symbol is defined?

659


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

764


What are the benefits of organizational structure?

568






How many levels of indirection in pointers can you have in a single declaration?

589


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1350


Why c is called object oriented language?

578


What does a pointer variable always consist of?

659


What is character constants?

710


Does * p ++ increment p or what it points to?

610


What is use of bit field?

768


What's a good way to check for "close enough" floating-point equality?

621


What is the g value paradox?

644


What are the Advantages of using macro

679