Question

Question 1 Fain the blank The memory contents of a
Question 1 Fain the blank The memory contents of a
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Question-1 Answer is

contains an memory location(address of the pointer)

Question-2 Answer is

   int a,b,*p,c;
   a=5,b=3,p=&b; // p holds address of b
   c=b+*p;// here *p contains values in that address so 7+7

c value is 14

Add a comment
Know the answer?
Add Answer to:
Question 1 Fain the blank The memory contents of a pointer contains an Question 2 After...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In the blank below, write the contents of array arr after the following code is executed...

    In the blank below, write the contents of array arr after the following code is executed up to the comment indicated in the main procedure below? #include <iostream> #include <algorithm> using namespace std; void do something(int list[], const int size); int main() { const int SIZE(10); int arr[SIZE] = { 5, 8, 1, 7, 3, 9, 4, 6, 10, 2 }; do somethingCarr, SIZE); ** Write the contents of array arr in the space below when execution reaches here. */...

  • What's the answer of this two questions? Question 2 0 / 1 point If R3 contains...

    What's the answer of this two questions? Question 2 0 / 1 point If R3 contains x5000 and the JSRR instruction is stored in x4000, the value of the PC after execution of JSRR R3 is: the contents of memory location x5000 the contents of memory location x4000 x5000 X4000 Question 3 0 / 1 point Which instruction performs the exact same function as JMP: BRnp none BRnzp . BRnz

  • #include <stdio.h> int main(int argc, char *argv[]) {      char a, *pc, c[9];      int i, *pk, k[9];      a='...

    #include <stdio.h> int main(int argc, char *argv[]) {      char a, *pc, c[9];      int i, *pk, k[9];      a='z';      pc=&(c[8]);      pk=&(k[0]);      for (i=0; i<9; i++)     {           *pc=a-(char)i;           pc--;           *pk=(int)a-i;           pk++;           }                     return 0; }//end of main Answer the below questions with the above code Write out the memory map for the above C code in the following table. For array variables, list the address range for the entire array. Assume the memory address starts from 100, that is, the address for a...

  • Question 1: Pointers You are given the following C code and memory diagram. The “contents” column...

    Question 1: Pointers You are given the following C code and memory diagram. The “contents” column of the memory diagram shows the value of the variable. Update the “contents” column of the memory diagram for each assignment in main(). long *pt; long data;    long buffer[4]; void main(void){   pt = &buffer[1];   *pt = 1234;   data = *pt; } address      contents   variable 0x20000000 0x00000000    pt 0x20000004 0x00000000    data 0x20000008 0x00000000    buffer[0] 0x2000000C 0x00000000    buffer[1] 0x20000010 0x00000000    buffer[2] 0x20000014 0x00000000    buffer[3]...

  • Stack Operation 10. (10 pts.) Show the contents of the stack and affected registers at the two marked points in the exe...

    Stack Operation 10. (10 pts.) Show the contents of the stack and affected registers at the two marked points in the execution of the followin code. Assume RO-0, R1-1, R2-2, R3-3, R4-4, R5-5, and R6-6. The initial value for stack pointer (prior to executing this code block) is given as SP-0x20001000 PUSH R2,R3) ADD R4, R1, Re ;<---A POP R5, R6) ADD R5, R5, R4 ADD R6, R6, R5 PUSH (R4-R6); SUBS Re, RO,R1-B a) Show the contents of Stack,...

  • TRUE/FALSE 1. If pl is an integer pointer variable, with the value of 1000, pl++ changes...

    TRUE/FALSE 1. If pl is an integer pointer variable, with the value of 1000, pl++ changes P1 to point to the memory location 1001. ANSWER: T 2. When you return a dynamic array to the freestore, you must include the number of elements in the array 3. You can assign an array to a pointer variable. 4. The size of dynamic arrays must be declared at compile time. 5. int *pl; declares a static variable. ANSWER: F ANSWER: F ANSWER:...

  • basic c++ 2. AC++ program contains the following C++ code (assume an int occupies 2 bytes...

    basic c++ 2. AC++ program contains the following C++ code (assume an int occupies 2 bytes each in memory): int x[ ] = { 10, 20, 30, 40, 50, 60, 70, 80); int *ptrx ptrx = x; Array x starts at memory location 2140. a. What is the value assigned to ptrx? b. What is the value of (x+2)? c. What is the value of *x? d. What is the value of (*x+2)? e. What is the value of *(x+2)?...

  • SUBROUTINES Example 2: May 2006 Question 2 The main program uses a subroutine located at address...

    SUBROUTINES Example 2: May 2006 Question 2 The main program uses a subroutine located at address 3000,- Read the program and answer the following questions. (a) What is the address of the instruction DCR E in the main program?[3 marks] (b) What instructions need to be written in the subroutine and give the address of the instructions? [3 marks] List the contents of the stack, the PC, and the stack pointer after (i) Execution of CALL instruction in the main...

  • Note: The question needs to be answered in "C Programming Languange ". And after the question fin...

    Note: The question needs to be answered in "C Programming Languange ". And after the question find 3 pages for needed informations. Spring CE4717 Language Processors Q1. Consider the following LEx program. return R1 return R2 return R3 return R4 return R5; return R6; IA-2a-z)[A-Za-z0-9]- -2 10-91+ 10-9a-EA-FI Ihi] [01] [01] 이삐 t Vtin) int main (void) int tcode; do f tcode -yylex()i printf ("token type td \"%s\"\n", tcode, yytext); ) while (tcode)i return 0; i. Explain the steps needed...

  • DO 2 AND 3. Question #1 Convert the following assembly program into machine code. LDAA WSA1 STAA $1000 INCA LDAB $10...

    DO 2 AND 3. Question #1 Convert the following assembly program into machine code. LDAA WSA1 STAA $1000 INCA LDAB $1000 DECB ABA Here: Bra Here Question # 2 (a) in Question # 1, determine the values of PC, A, B, N, Z, V, C after each instruction (b) Verify your answers by using CodeWarrior Question # 3 Assume that the program in Question 1 is saved in memory starting at location $COOA. Drawa memory diagram showing the contents (in...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT