write a program that takes 5 digit no and calculate 2 power
that no and print it.

Answer Posted / venkataramakrishna.danduri

#include <iostream.h>

void main()
{
int b = 0;
int num5digit;
cin>>num5digit;
b = 1<< num5digit;
cout<<"b = "<<b;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I download c++?

573


What is an operator function? Describe the function of an operator function?

616


What are the advantages of c++?

593


Which of the following is evaluated first: a) && b) || c) !

1807


Can a new be used in place of old mallocq? If yes, why?

635






Can we declare a base-class destructor as virtual?

584


Why are pointers used?

580


How new/delete differs from malloc()/free?

616


What is an adjust field format flag?

644


Explain about Garbage Collector?

651


Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?

2016


Difference between struct and class in terms of access modifier.

695


What is the average salary of a c++ programmer?

542


What is this pointer in c++?

734


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

612