Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write out the memory map for the following code, providing all values at the end of execution. Assume the user enters 8 6 5 4

Write out the memory map for the following code, providing all values at the end of execution. Assume the user enters 8654115 at the prompt. How many total bytes does this code declare for variables? Columns needed are LABEL, VALUE and ADDRESS.
main()
{
char x[3][8];
int j,length;
float number;
double avg;
for (j=0; j<3; j++)
if (j ==0)
{
printf("Enter input string: ");
scanf("%s",x[0]);
length=strlen(x[0]);
}
else if (j ==1)
{
x[0][0]=9; x[1][0]=7; x[2][0]=5;
number=(float)(x[0][0]+x[2][0]);
}
else
avg=(double)(x[0][0]+x[1][0])/2.0;
}

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

More Books

Students also viewed these Databases questions

Question

Describe briefly the steps used to develop a forecasting system.

Answered: 1 week ago