Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is c please do c-h do not do a thank you 3. [80 pts] Assume that single-precision floating-point numbers are stored in 4 bytes,

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedthis is c please do c-h do not do a thank you

3. [80 pts] Assume that single-precision floating-point numbers are stored in 4 bytes, and that the starting address of the array is at location 1002500 in memory. Each part of the exercise should use the results of previous parts where appropriate. (a) Define an array of type float called numbers with 10 elements, and initialize the elements to the values 0.0, 1.1, 2.2, ..., 9.9. Assume the symbolic constant SIZE has been defined as 10. (c) Print the elements of array numbers using array index notation. Use a for statement. Print each number with 1 position of precision to the right of the decimal point. (d) Give two separate statements that assign the starting address of array numbers to the pointer variable nPtr. (e) Print the elements of array numbers using pointer/offset notation (i.e. x[i] = *(x+i)) with the pointer nPtr. (f) Print the elements of array numbers using pointer/offset notation with the array name as the pointer. (g) Assuming that nPtr points to the beginning of array numbers, what address is referenced by nPtr+8? What value is stored at that location? (h) Assuming that nPtr points to numbers[5], what address is referenced by nPtr = nPtr - 4? What's the value stored at that location

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

2 What supply is and what affects it.

Answered: 1 week ago

Question

3 How supply and demand together determine market equilibrium.

Answered: 1 week ago