Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following lines of code for the next 3 questions - assume function_

ID: 3767721 • Letter: C

Question

Consider the following lines of code for the next 3 questions - assume function_abc is prototyped to expect the type of arguments it is passed, long int i. j. k|5J.*ptr; function_abc(i.k.ptr); Where in memory arc the 4 variables placed? Pick from 1. at a specific location in RAM. 2. at a specific location in ROM. or 3. in RAM wherever the SP is pointing at the time the function that includes the declaration is entered? How many total bytes arc allocated for the 4 variables? How many bytes arc passed to function_ abc for the 3 arguments? Explain. Assume the MT1M module is configured so that the counter is counting. Write the C-language statement that will stop the counting by setting the stop bit in the control register that contains it. Do not change any other bits. Use the following declarations for the next two questions, static unsigned char x. y=0x3C. z=0x66: What is the value of x after the following statement is executed? Show answer in hex. x = y& z; What is the value of x after the following statement is executed? Show answer in hex. x = y&& z; Name all the LCD pins that we had to connect to the SOS in the lab that used the LCD? For a set of pins with the same name except for an ending number, you can show a range of numbers instead of writing each name completely. How long did we have to wait after sending a character to the display before we could send another one?

Explanation / Answer

7.we can take four variables will take 16 bytes of data.

8. a b c

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

If a variable with n bits can hold 2n (2 to the power of n, also commonly written 2^n) possible values. Because a byte is 8 bits, a byte can store 28 (256) possible values.

The size of the variable puts a limit on the amount of information it can store -- variables that utilize more bytes can hold a wider range of values. We will address this issue further when we get into the different types of variables.

Second, computers have a finite amount of free memory. Every time we declare a variable, a small portion of that free memory is used as long as the variable is in existence. Because modern computers have a lot of memory, this often isn’t a problem, especially if only declaring a few variables. However, for programs that need a large amount of variables

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote