Double Linked List

L

Little

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.
 
V

Vladimir S. Oka

Little said:
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
 
C

CBFalconer

Little said:
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/>
 
J

Jordan Abel

(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.
 

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,470
Messages
2,571,807
Members
48,797
Latest member
PeterSimpson
Top