Question: 1. Question 1: Data Types Saved What are the outputs of the following codes? You can use N/A to indicate unpredictable results. (1) float f=

 1. Question 1: Data Types Saved What are the outputs ofthe following codes? You can use N/A to indicate unpredictable results. (1)float f= 23; int j = (int)f; printf("%d",j]; (2) int i =

10, j = 20; float x = {float) i/j; float y =

1. Question 1: Data Types Saved What are the outputs of the following codes? You can use N/A to indicate unpredictable results. (1) float f= 23; int j = (int)f; printf("%d",j]; (2) int i = 10, j = 20; float x = {float) i/j; float y = i/j; printf("%f %f", x, y); (3) short i = 32767; short j = 1; short x = i + j; printf("%d", x); (4) unsigned short i = 32767; unsigned short j = 1; unsigned short x = i + j; printf("%u", x); Write your answer here. 2. Question 2: Arrays Which of the following is legal array operation. int a[4] = {1, 2, 3, 4); int b[4]; b = a; int a[4] = {1, 2, 3}; int a[2][2] = {1, 2, 3, 4); int a[3] = {1, 2, 3, 4); int a[4]; for (int i = 0; i a[6]) ? a[7]: a[8]; printf("%d", al(a[2]+a[3]]%10]); scaf("%d%d", &a[1], &a[10]); 4. Question 4: Coding Saved 2 points Write a program that calculates the average word length for a sentence. For example, if the input sentence is "It was deja vu all over again." The output is "Average word length: 3.4". For simplicity, a sentence ends with a punctuation mark. Your program should consider the punctuation mark to be part of the word to which it is attached. Display the average word length to one decimal place. 1 Full Screen v Grading 2 code.c + New #include 1 2 3 4 5 6 int main(void) { float average_length // Your Code Here 0; Test Case 1 Not run printf("Average word length: %.1f ", average_length); 7 8 9 Test Case 2 Not run return 0; 10}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!