Not exactly an Algorithm - Programmers Heaven

Howdy, Stranger!

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

Categories

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.