Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Answer the following well. Read all directions, answer all parts and make sure you answer the parts correctly. You have to do this well. Use
Answer the following well. Read all directions, answer all parts and make sure you answer the parts correctly. You have to do this well. Use the code and everything, do as it says and answer the questions.
For this assignment, you will need to run a Cprogram Use the attached Cprogram, i have screenshotted iti apologize if it may be alot to write down on ur compiler but please just type it down and run it and do the directions as followed. So I have sent the screenshot of the code we are working with. Following is the directions you have to do
Consider the attached Cprogramthis is not necessarily good code, as its main purpose is educational Run the program, commenting out the lines with blanks you may need to modify the header for your systemMake sure you understand why you get the outputs your program produces before proceeding
that is after all the main point of this assignment.
You have to modify the code, add the lines in the questions that says for the mod, for the the three blanks etc etc, make sure you send the proper code modified as stated in the instructions, and make sure your output is correct as asked too based on the questions and you send the output as well.
I will send the parts to the question it should not be that much, please answer all, i cant send parts here and another question because you need all to solve this correctly and do the correct code modification.
Now based onBased on the programs output, determine how many bits your system uses to store short, regular, and long
integers. the code you modify, the running of itanswer the following eight parts
Based on the programs output, determine how many bits your system uses to store short, regular, and long integers.
You wish to determine how many bits your system uses to store pointers. Modify the program to determine this label your modification MOD in comments and state your conclusion
Based on your output, make a diagram indicating the addresses in memory where each of the programs variables are stored and their values at POINT A sample diagram not for the given program may look like:
Address: Value: Name
xABCDABFx
xABCDABFfooy
k fooyk
xABCDABBfooy
xABCDABBfoo zp points to foo
xABCDABBw
Use that diagram as a model for question Of course, you dont need to specify every single element for large arrays, as long as you make it clear you
understand whats going on It is general practice to indicate the first and last elements, along with anarbitrary index k in the middle as with foo in the above diagram, if the is filled in
Consider the output produced on the line labeled EXPLAIN that is in the code sent. Explain why you get this output a brief explanation suffices as long as you show an understanding
After understanding the program, can you make any conclusions about how CC interpret addition on integers and pointers? Are they the same? Explain. Obviously, your explanation should point out the outputs that support your answer.
The program contains three blanks. Fill the first two with appropriate integer constants to print for both new outputs. Depending on your platform, it is possible though unlikely that your original program will produce a strange error message egbus errorsegmentation error before you get to this point. If so you should try another compiler or computer.
Fill in the third blank in the program to print
Does your compiler allocate local scalar variables growing up or down in memory ie higher or lower addresses Explain how you know this from your program output.
These are all the parts, please do it well. I have the code attached, modify the code and change it as such asked and make sure output is correct. Please make sure all answers are correct. Do this well, please
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started