DEV Community

A Curious Learner
A Curious Learner

Posted on

Attention please: The symbol for exponentiation is not ^!

When I first used a C program to calculate powers, I used the "^" symbol.
But the way to calculate a power is to call the pow()function. "^" is bitwise exclusive OR operator in C.
Here is the usage of pow() function: pow(2,3)=2*2*2=8.

Top comments (0)