Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that an int requires one cell in memory, that a float number requires two cells, and that the strict members are found In contiguous

image text in transcribed
Assume that an int requires one cell in memory, that a float number requires two cells, and that the strict members are found In contiguous memory locations with no gaps. Declare a one-dimensional array type, Weather List Type, of Weather Type components, to be indexed by values of type Month Type. Declare a variable, yearly Weather, of Weather List Type. Assign the value 1, 05 to the actual rainfall member of the July record in yearly Weather. If the base address of yearly Weather is 200, what is the address of the member that you assigned in part (b)? Declare a two-dimensional array. decade Weather, of Weather Type components, to be indexed by values of type Month Type in the first dimension. Draw a picture of decade Weather. Assign the value 26 to the Anglo Temp member of the March 2006 entry. Define a three-dimensional array at the logical level. Suggest some applications for three-dimensional arrays. Use the following declarations for Exercises 14-16. typedef char String [10]; strict Student Record {String first Name; String last Name; int id; float gpa; int current Hours; int total Hours;}; Student Record student; Student Record students [100]; Assume that an int requires one cell in memory, that a float number requires two cells, and that the strict members are found in contiguous memory locations with no gaps. Construct a member-length-offset table for Student Record. If the base address of student is 100, what address does the compiler generate as the target of the following assignment statement? student.gpa = 3.87; How much space does the compiler set aside for students

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

how to write an array of dates

Answered: 1 week ago

Question

Explain what a multi-dimensional array is.

Answered: 1 week ago