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=


![float f= 23; int j = (int)f; printf("%d",j]; (2) int i =](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f455da41147_79366f455d9d48b7.jpg)

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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
