Question: Can someone trace this example? This is the example: Adding a record to an empty list For example, uaccountno: 1000 uname: Spongebob Squarepants uaddress: 123

Can someone trace this example?

This is the example:

  1. Adding a record to an empty list

    For example,

  • uaccountno: 1000
  • uname: Spongebob Squarepants
  • uaddress: 123 Bikini Bottom
  • Heap: No record
  1. Adding a record to a list which has two records (every account number is different form others)

    For example,

  • uaccountno: 1000
  • uname: Spongebob Squarepants
  • uaddress: 123 Bikini Bottom
  • Heap:
    • Record1:
      • accountno: 1200
      • name: Plankton
      • address: 321 Chum Bucket
    • Record2:
      • accountno: 900
      • name: Mr.Krabs
      • address: 231 Krusty Krab
  1. Adding a record to a list that has two records (the second existing record has the same account number as that of the new record)

    For example,

  • uaccountno: 1000
  • uname: Spongebob Squarepants
  • uaddress: 123 Bikini Bottom
  • Heap:
    • Record1:
      • accountno: 1200
      • name: Plankton
      • address: 321 Chum Bucket
    • Record2:
      • accountno: 1000
      • name: Mr.Krabs
      • address: 231 Krusty Krab

This is the trace template:

Can someone trace this example? This is the example: Adding a record

Complete the following tracing tables by examining your pseudocode. Note1: the tables below are template, so please add/remove necessary/unnecessary spaces, respectively. Note: if a value changes, keep the old value by stikethrough, e.g.. "3-5" Note: if the variable is a character array (not a character pointer), show the string in the "value" section. Note4: If the variable is a pointer (including char*), show the stored address value in the "value" section. S Size of data type (bytes) int char pointer 1111111 SHERRER Heap Value Test Case 1 | Adding a record to an empty list Stack Address Name Datatype Scope start struct record addRecord uaccountno int Record uname char 251 addRecord uaddress char[50] Record Address Datatype Value ............ Name accountno name address next Address Datatype Value Name accountno name address next See S Test Case 2.1Adding a record to a list with two records (every account number is different form others) Stack Heap Address Name Datatype Scope Value start struct record addRecord Address Name Datatype uaccountno int addRecord accountno char[25] Record name ............................................ uaddress char(50) addRecord address next Value uname Address Datatype Value free HERRRRRRR Name accountno name address next Test Case 3 Adding a record to a list with two records (the second existing record has the same account number as that of the new.record) Stack Heap Address Name Datatype Scope start struct record addRecord Address Name Datatype Value uaccountno int Record accountno char(25) Record uaddress char(50) addRecord address Value uname name next Address Datatype Value Name accountno name address next Complete the following tracing tables by examining your pseudocode. Note1: the tables below are template, so please add/remove necessary/unnecessary spaces, respectively. Note: if a value changes, keep the old value by stikethrough, e.g.. "3-5" Note: if the variable is a character array (not a character pointer), show the string in the "value" section. Note4: If the variable is a pointer (including char*), show the stored address value in the "value" section. S Size of data type (bytes) int char pointer 1111111 SHERRER Heap Value Test Case 1 | Adding a record to an empty list Stack Address Name Datatype Scope start struct record addRecord uaccountno int Record uname char 251 addRecord uaddress char[50] Record Address Datatype Value ............ Name accountno name address next Address Datatype Value Name accountno name address next See S Test Case 2.1Adding a record to a list with two records (every account number is different form others) Stack Heap Address Name Datatype Scope Value start struct record addRecord Address Name Datatype uaccountno int addRecord accountno char[25] Record name ............................................ uaddress char(50) addRecord address next Value uname Address Datatype Value free HERRRRRRR Name accountno name address next Test Case 3 Adding a record to a list with two records (the second existing record has the same account number as that of the new.record) Stack Heap Address Name Datatype Scope start struct record addRecord Address Name Datatype Value uaccountno int Record accountno char(25) Record uaddress char(50) addRecord address Value uname name next Address Datatype Value Name accountno name address next

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!