Basic and Advance C Question:

Download Job Interview Questions and Answers PDF

Why does not C have an exponentiation operator?

C Programming Interview Question
C Programming Interview Question

Answer:

One reason is probably that few processors have a built-in exponentiation instruction. C has a pow function (declared in <math.h>) for performing exponentiation, although explicit multiplication is usually better for small positive integral exponents. In other words, pow(x, 2.) is probably inferior to x * x. (If you're tempted to make a Square() macro, though, check

Download C Programming Interview Questions And Answers PDF

Previous QuestionNext Question
The predefined constant M_PI seems to be missing from my machines copy of math.h.How do I round numbers?