Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Not exactly an Algorithm

NetmasterNetmaster Posts: 16Member
If the memory cell whose address is 5 contains the value 8, what is the difference between writing the value 5 into cell number 6 and moving the contents of cell number 5 into cell number 6?
Netmaster

Comments

  • Josh CodeJosh Code Posts: 675Member
    [b][red]This message was edited by Josh Code at 2003-2-20 4:51:19[/red][/b][hr]
    : If the memory cell whose address is 5 contains the value 8, what is the difference between (writing the value 5 into cell number 6) and (moving the contents of cell number 5 into cell number 6)?
    : Netmaster
    :
    both situations, before and after:
    cell 5 has the value 8

    situation 1:

    cell 6 has its value set to 5

    situation 2:

    (cell 6).value = (cell 5).value
    (cell 6).value = 8

    values afterwards:

    situation 1:
    cell 5 has the value 8
    cell 6 has the value [red][b]5[/b][/red]

    situation 2:
    cell 5 has the value 8
    cell 6 has the value [red][b]8[/b][/red]


Sign In or Register to comment.