Test questions

Mar 3, 2012 at 11:04am
Hi, I can't find some of answers to the questions and I hope the forum can help:

1.Programs written in low-level languages usually execute ___(more accurately/less accurately/faster/slower)_ than programs written in high-level languages.

2. Is the expression sqrt(pow(abs(num1), num2)) is a valid expression?

3. Relational expressions are also called ____(paths/options/choice/conditions).

Thanks in advance!
Mar 3, 2012 at 11:10am
These weren't in your textbook?

The first one is subjective and it depends on certain factors.

The second one I would run through a compiler to know for sure.....

isn't the 3rd one in most math books, most notable Calculus books?
Mar 3, 2012 at 11:14am
closed account (zb0S216C)
1. Not sure.

2. Best thing to do here is look at the documentation of all thee functions[1][2][3].

3. Look at this code:

1
2
while( X < Y )
    // ... 


References:
std::pow( ): http://www.cplusplus.com/reference/clibrary/cmath/pow/
std::abs( ): http://www.cplusplus.com/reference/clibrary/cmath/abs/
std::sqrt( ): http://www.cplusplus.com/reference/clibrary/cmath/sqrt/


Wazzak
Last edited on Mar 3, 2012 at 11:14am
Mar 3, 2012 at 2:01pm
Thanks, I managed to get the answers for Q2 & 3. Q1 is still confusing to me. Pls help if possible. Thanks again!
Mar 3, 2012 at 2:11pm
The expected answer here is probably "faster".
Mar 3, 2012 at 2:37pm
Thanks hanst99, ans is faster.
Topic archived. No new replies allowed.