Question: 1. Assignment [50pts] 1. Write a C program that will print the sizes and ranges of common data types char, float, int, long int, unsigned
1. Assignment [50pts] 1. Write a C program that will print the sizes and ranges of common data types char, float, int, long int, unsigned long int, unsigned char, unsigned short int, unsigned int, long long int, unsigned long long int, short int, and double (in the same order). Your program's output should be like the following: Note: You should use definitions given in the limits.h and float.h header files for the ranges of data types. For float and double, display positive minimum value in Minimum column. 2. Compute the maximum and minimum values of a data-type whose size is 8 bytes by hand. Perform this computation considering the data-type to be (a) unsigned and (b) signed. This computation may be done on paper and copied into the submission or solved in a word document. In the list of data types that you printed in Q1, which data types are 8-bytes? Does your maximum and minimum values match with your output in Q1? 3. Write a C program that declares and initializes an integer array x. Array x should have at least 5 elements. Declare and initialize two additional integer variables m and c. You are required to compute another integer array y such that each element of y follows the relation mx+c. Your output should look something like following: Input Array X:[125356] Input Constants m:5 and c:2 Output Array Y: [7823132328]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
