write a program that takes 5 digit no and calculate 2 power
that no and print it.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / kathir
#include<iostream.h>
void main()
{
int a,n=0;
cout<<"Enter the 5 didgit no:"<<endl;
cin>>a;
n=(a*a);
cout<<"The two power given no is:"<<n<<endl;
}
| Is This Answer Correct ? | 4 Yes | 6 No |
Answer / yeah
#include<iostream.h>
#include<math.h>
void main()
{
int a,n=1,i;
cout<<"enter Num";
cin>>a;
//n=pow(2,a);
for(i=0;i<a;i++)
n*=2;
cout<<n;
}
| Is This Answer Correct ? | 3 Yes | 6 No |
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
Is c++ double?
Why are arrays usually processed with for loop?
Distinguish between new and malloc and delete and free().
what are the types of Member Functions?
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
What is the difference between the functions rand(), random(), srand() and randomize()?
What is a try block?
sizeof- is it functioning statically or dynamically?
What is split a string in c++?
Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()
What is a dll entry point?