![]() |
|
#1
|
|||
|
|||
Encoding and decoding of dataA linked list of characters is to be sent across a network in the form of a stream of bytes.Write the code in C language for encoding the data structure on the sender side and decoding it on the receiver side.
I could write it in short like this but not getting it exactly...... CPP / C++ / C Code:
Last edited by LuciWiz : 11-Sep-2007 at 14:47.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|
#2
|
|||
|
|||
Re: Encoding and decoding of dataQuote:
1. What, exactly, is the assignment? Is it assumed that you will be presented with a "linked list of chars" and you have to get them into an array of chars in a form suitable for transmission over a network (with some kind of encoding algorithm that processes the stream of chars)? Are you supposed to implement functions to get stuff into and out of the linked list? Or what? 2. Regardless of what you are given or what is assumed, how are you going to test whatever part of the project it is that you are going to implement? (A main() function that calls the various functions?) 3. What, exactly, would you like for us to do for you? I mean, speaking for myself, nothing among the lines of (approximately) C code that you posted makes much sense, either by itself or in the context of writing code for "encoding the data structure" (whatever that means). There may be lots of people who would like to help, but you have given us not much to work with. Regards, Dave |
|
#3
|
|||
|
|||
Re: Encoding and decoding of dataThe linked list of characters is assumed to be there that is to be sent across a network in the form of a stream of bytes.A C program is needed to encode the data structure on the sender side and decode it on the receiver side.Simple C functions are needed to write the code.I meant no algorithms as such..
|
|
#4
|
|||
|
|||
Re: Encoding and decoding of dataQuote:
Make a program where: - you type in data, - it encodes the data one char at a time, - and sends encoded data to a file. Then make a program where: - it opens the file of encoded data, - decodes it one char at a time, - and prints the decoded data to the screen... Don't worry about storing it in a linked list or array at first. Just take one char , encode , send ,,, and vice versa. THEN move into storage procedures. and THEN move into sending accross the network... Let us know where you get stuck and we'll have something to start with. We can't be putting it all together for you... but we're happy to help YOU build the pieces. Howard; |
|
#5
|
|||
|
|||
Re: Encoding and decoding of dataDo I understand the task at hand that Encoding is converting data from a linked list to a byte array (stream) and decoding is taking the byte stream and recreate the linked list again?
Do you have to write the network code? Or is that part supposed to be simulated? |
|
#6
|
|||
|
|||
Re: Encoding and decoding of dataNow that is a puzzle isn't it? (I think it's encoded)...
He says a: ' linked list of characters is assumed to be there' ...then: 'encode the data structure on the sender side and decode it on the receiver side' I took 'Encoding' to mean converting the chars to be unreadable as in using these two sets: CPP / C++ / C Code:
I GUESS the linked list 'structures' would be merely something like: CPP / C++ / C Code:
Maybe we'll find out? Stay tuned for the next episode! Howard; |
Recent GIDBlog
Toyota - 2008 September Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The