Anyone can help?

T

Tinker

If we used an array of many structures such as:

struct instruction array[1000];

and this array holds 500 instructions from array[0] to array[499], how
can a new instruction be inserted between the 2nd and 3rd
instructions? Why is a linked list preferable in this situation?

Pleas advise Thx

Tinker
 
C

ChokSheak Lau

Tinker said:
If we used an array of many structures such as:

struct instruction array[1000];

and this array holds 500 instructions from array[0] to array[499], how
can a new instruction be inserted between the 2nd and 3rd
instructions? Why is a linked list preferable in this situation?

Pleas advise Thx

Tinker

use a linked list please. a doubly-linked list is preferred.

chok
 
D

Default User

Tinker said:
If we used an array of many structures such as:

struct instruction array[1000];

and this array holds 500 instructions from array[0] to array[499], how
can a new instruction be inserted between the 2nd and 3rd
instructions? Why is a linked list preferable in this situation?


Sounds a lot like homework. What do you think?



Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,147
Messages
2,570,835
Members
47,382
Latest member
MichaleStr

Latest Threads

Top