For question 13, assume the function compute is invoked with the following state
ID: 3822762 • Letter: F
Question
For question 13, assume the function compute is invoked with the following statements: x = 36.0; total = compute(x, Sqrt (x), x = 36.0);/*************************************//* This function counts positive parameters. *//*************************************/{int compute(double a, double b, double c) {int count; count = 0; if (a > 0) count-count - 1; if (b > 0) count = count + l; if (c > 0) count = count + 1; return count;} What is the new value of total after the function has completed its operations? -1 0 1 unknown What is the best structure to use to stop a divide-by-zero calculation and quit the program? If for while cannot be done In C, user-defined function prototype statements generally appear in preprocessor directives. True False The switch statement is used for multiple-selection decision making and can be used to replace all if/else statements. True False Input and output files must be closed to flush data from buffered memory to the hard disk. True FalseExplanation / Answer
Question 13:
Answer: B.0
In compute method, a value is 36 and b value 6 and c value is 0
First if condition will returen true so count value is -1
Second If condition will return true so count value is 0
Third Iff conditoon will return false; So finnally count value 0 will be returned from the method.
Question 14:
Answer: A. If
Question 15:
Answer: A. True
In C, user defined function prototypes statements generally appear in preprocessor directives
Question 16:
Answer: A. True
Question 17:
Answer: A. True
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.