Raising 2 to the power 24

Question : Calculate 2^24.
Answer : 1 << 24 should give the answer on any platform.

C/C++
#include <math.h>
void main()
{
// Case 1 :
int answerLS = 1 << 24;
//Case 2
double answerPOW = pow(2,24);
}

Privacy & Terms