classroom.google.com 1. (8 pts) Answer true or false and explain why. a. The following declaration of two integers is valid: int myWeight1, MyWeight1; b. The following declaration of a float variable is valid: float 2nd year; C. The following declaration of a char variable is valid: char re-educated; d. Not indenting the code properly does not lead to compilation errors. 2. (12 pts) What is the output of the following program? #include
int main(void) int x = 3, y = 8; x = 2*y; /* 2*y is assigned to variable x */ y = y + 2; /* y + 2 is assigned to y */ x - 2*x + y; /*the current values of x and y are used printf("X - Ad Y = d ", x, y); return 0; 3. (15 pts) Fix each printf statement below so the expected output is printed: //Expected output: +75.602% printf("%+.3f%, 75.6023); //Expected output: He said "Good Day" printf("She said "Nice Job"); //Expected output: % printf(%c, '%'); 4. (10 pts) Give the output of the following statement. If the program outputs any spaces, tell how many. printf("%+017.4E", 12.52); 5. (10 pts) Write calls to printf to display the variable x in the following formats: a. x is a float. Format: Exponential notation, left justified, in field size of 5 with 3 digits after the decimal point b. x is an int. Format: Right justified, in a 9 digit field 6. (15 pts) Assume that a and b are int variables and is a float variable. What is the value of each variable after the following scanf is called? scanf("%d%f%d", &a,&x, &b); supposing the user enters: 9.2 8 13 7. (15 pts) Write a single statement to read the time from the standard input in the form of humus and store it in three integer variables named hours, minutes and seconds. 8. (15 pts) Write a single statement to read a percentage from the standard input. For example, the user enters 13.6% and program stores 13.6 into a float variable named percent. The variable percent has been declared to be float