Question: 1. What is the common sense behind the programming proverb that advocates mini- mizing the use of global variables in a program to help communicate



1. What is the common sense behind the programming proverb that advocates mini- mizing the use of global variables in a program to help communicate inputs and outputs between functions? 3. Give a test case that reveals the bug in Program 5.47. T Program to compute the average rainfall in New Haven / / a translation into C from Soloway, CACM 9-86, p. 853 */ 51 float int sum, rainfall, average; count; int main(void) 10 sum count = = 0.0; 0; printf("Please input a rainfall: "); scanf("%f",&rainfall); while ( rainfall != 99999.0 ) { while ( rainfall 0) { average = sum/count; printf("Average rainfall = %4.2f ", average); } else { printf("No valid inputs. No average calculated. In"); 35
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
