473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Double Linked List

Could someone help me get started on this program or where to look to
get information, I am not sure how to put things together.

1. Create 4 double linked lists as follows:

(a) A double linked list called NAMES which will contain all C like
identifiers of less than
256 characters long identified in the input file F. Each identifier
will be represented by
a triple (I, length, string) where I is used to identify the type of
the object as being an
identifier, length is an integer representing the length of the
identifier in characters, and
string is a string of characters representing the identifier itself.

(b) A double linked list called NUMBERS which will contain all C like
numbers of less than
256 characters long identified in the input file F. Each number will be
represented by a
triple (N, length, string) where N is used to identify the type of the
objects as being a
number, length is an integer representing the length of the number in
characters, and
string is the string of characters representing the number itself.

(c) A double linked list called SEPARATORS which will contain all C
language separators
and operators identified in the input file F. Each separator will be
represented by a triple
(X, length, string) where X is S for separators, O for operators, R for
symbols denoting
relations, L for new line and E for end of file. The length is an
integer representing the
length of the symbol and string is the string of characters
representing the symbol itself.

(d) A double linked list called UNKNOWN which will contain all symbols
you discovered in
the file F which could not be classi ed in the lists NAMES, NUMBERS,
SEPARATORS.
Each object in this list will be represented by a triple (Y, length,
string) where Y is used
to signify that an unknown symbol was discovered, length is an integer
representing the
length in characters of the unknown symbol, and string is the string of
characters that
make up the unknown symbol itself.

The input file F will be an arbitrary text file in your directory. The
actions of list creation and list printing will be programmed as
functions which will be called from a main program. Use in your program
the functions list(H, T), to create an empty list L whose header is H
and tail is T, and append(L, OBJ), to append the object OBJ to the list
L.

Jan 22 '06 #1
3 3288
Little wrote:
Could someone help me get started on this program or where to
look to get information, I am not sure how to put things
together.


<snipped homework assignment waffle>

Good sources of information:

- your C textbook
- your algorithms textbook
- your coursework materials
- this newsgroup (once you have specific C questions)
- Google

To get you started:

- a doubly linked list is a list of objects where each object
points to the previous and next object in the list
- a bare bones C program

int main(int argc, char *argv[])
{
return 0;
}

Once you add some meat to this skeleton and/or have some
specific C questions do come back here.

Cheers

Vladimir
Jan 22 '06 #2
On 2006-01-22, Little <co************@yahoo.com> wrote:
(d) A double linked list called UNKNOWN which will contain all symbols
you discovered in the file F which could not be classi\fed in the


You have a stray form feed character in your post there (changed to \f
as i reply) - that can have unpredictable effects on some newsreaders.
slrn, for example, will mask all following characters with '*' until the
user presses the space (page down) key.
Jan 23 '06 #3
Little wrote:

Could someone help me get started on this program or where to

.... snip homework specification ...

I charge 100 USD per hour for consulting. Homework gets a special
rate of 200 USD per hour. I will do yours for an advance payment
(certified check will do) for one 8 hour day (minimum charge).

If you supply the name and email address of your instructor, so the
results can be shipped directly, the price goes back down to the
100 USD level. You could save $800 that way.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Jan 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Eugen J. Sobchenko | last post by:
Hi! I'm writing function which swaps two arbitrary elements of double-linked list. References to the next element of list must be unique or NULL (even during swap procedure), the same condition...
4
by: JS | last post by:
I have a file called test.c. There I create a pointer to a pcb struct: struct pcb {   void *(*start_routine) (void *);   void *arg;   jmp_buf state;   int    stack; }; ...
32
by: Clunixchit | last post by:
How can i read lines of a file and place each line read in an array? for exemple; array=line1 array=line2 ...
6
by: deanfamily | last post by:
I am re-posting my second problem. I have a double-linked list. I need to know if it is possible to remove just one of an item, instead of all that match the given criteria with the remove()...
1
by: Little | last post by:
Could someone help me figure out how to put my project together. I can't get my mind wrapped around the creation of the 4 double Linked Lists. Thank your for your insight. 1. Create 4 double...
3
by: Little | last post by:
Could someone tell me what I am doing wrong here about declaring mutiple double linked lists. This is what the information is for the project and the code wil be below that. Thank your soo much for...
4
by: FBM | last post by:
Hi, I am working on a program that simulates one of the elements of ATM. The simulation stores events which occurs every some milliseconds for a certain amount of time. Every time that an event...
9
by: Sheldon | last post by:
Hi, I am trying to understand linked lists and the different ways to write a linked list and double linked list. I have been trying to get this function called insert_word to work but to no...
6
by: tgnelson85 | last post by:
Hello, C question here (running on Linux, though there should be no platform specific code). After reading through a few examples, and following one in a book, for linked lists i thought i would...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.