Hello everyone, I am studying link list in c I have a project in which I have lookup table of rpm (clocks used to load the timer used for motor). This rpm table, I am taking in an array Now I want to implement a link list which will access the rpm from table and load it to timer of clock used for running the motor Is it possible Because as I am studying the link list, in that it is mentioned that link list is used instead of array Is it possible to access an array elements using link list ? If yes, then pls suggest me some link for it Correct me if I am wrong Thank u all
A linked-list is essentially a sequential access data structure; ie, you begin at one end of the list, and search through it until you find the desired entry.
A lookup table, on the other hand, is a direct access data structure; ie, you can go direct to the required entry simply by using its index.
"Now I want to implement a link list which will access the rpm from table ... Is it possible"
Of course it is possible - but I can't see any benefit in doing it!
There are many applications where linked-lists can be useful - but I really don't think this is one of them! Why do you think this will be beneficial? Why not just access the lookup table directly in the normal manner?
"Because as I am studying the link list, in that it is mentioned that link list is used instead of array"
Perhaps you need to study whatever source said that a bit more carefully and look at the reasons why a linked-list might be chosen instead of an array. I don't think this is one of them.
Note that this is standard 'C' - it has nothing specifically to do with Keil, C51, or the 8051
thanx for reply Andy; i know my project doesnot need any link list but to study purpose i want to implement, so that i will be familier with link list can u suggest me any link for this topic thank u again
www.8052.com/.../read.phtml
View all questions in Keil forum