Question

program. 13. Whats the output of the following program? #include< iostream> #include&math> using namespace std; int p 7; void main) extern double var int p abs(-90); system( pause); double var = 55; 14. How many times does # print? forlint i 0;j< 10; +ti) if(i-2141 6) continue; cout<< #; 15. Write the function declaration/prototype for a, pow function b floor function 16. State True or False a. b. c. d. e. isupper function returns a double value for loop is a post-test loop An else is paired with the most recent if that has not been paired with any other else. In Ctt, bool variables can be used to store the value of a logical expression. Executing a continue statement in the body of a loop skips the loops remaining statements and proceeds with the next iteration

0 0
Add a comment Improve this question Transcribed image text
Answer #1

13)

The output is 7(::p) + 90 (p) - 5.5(var) = 91.5

14)

7 times

from 0-9 there are 10 numbers out of which # will not be printed for 2,4,6 hence # will be printed for 10-3 = 7 numbers.

15)

a. double pow(double x,double y)

The pow() function takes ‘double’ as the arguments and returns a ‘double’ value.

b. T floor(T x) where T can be double,float,long double.

The floor() function takes a single argument and returns a value of type double, float or long double type.

16)

a. False, isupper retruns an int value

b. False, for loop is pre-test loop(test expression is evaluated before running the body of the loop) whereas do-while loop is a post-test loop(test expression is evaluated after executing the body of the loop)

c. False

Consider the following:
if(var < 100)

{

if(var <50)

{

cout << "Less than 50" << endl;

}

}

else

{

cout << "Greater than 100" << endl;

}

In this else is paird with if(var < 100) and not with if(var < 50).

d. True, bool stores either true or false.

e. True

Add a comment
Know the answer?
Add Answer to:
program. 13. What's the output of the following program? #include< iostream> #include&math> using namespace std; int...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT