character count program

2
Character Count www.master-gtu.blogspot.com Page 1 1. Character Count is framing technique in which each frame contain length of frame and the data Sender side: Input : Pankaj Vijay Jvims Ami Frame to send : 7pankaj6vijay6jvims4ami 7 p a n K a 6 v i a y 6 v i m s 4 a m I \0 Length of “vijay” + 1 length of “ami” + 1 Length of “pankaj” + 1 length of “jvims” + 1 Receiver side 1. Read 1 st  character deduct 1 from it store it in len. 2. Read next len characters. 3. Print it. 4. Now take next character deduct 1 from it say it as len. 5. Read next len characters from it. 6. Print it. Perform all above points again until null comes at an end.

Upload: dhruv-darji

Post on 01-Mar-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

 

Character Count

www.master-gtu.blogspot.com Page 1

1.  Character Count is framing technique in which each frame contain length of frame and the data

Sender side:

Input :

Pankaj

Vijay

Jvims

Ami

Frame to send : 7pankaj6vijay6jvims4ami

7 p a n K a 6 v i a y 6 v i m s 4 a m I \0

Length of “vijay” + 1 length of “ami” + 1

Length of “pankaj” + 1 length of “jvims” + 1

Receiver side

1.  Read 1st character deduct 1 from it store it in len.

2.  Read next len characters.

3.  Print it.

4.  Now take next character deduct 1 from it say it as len.

5.  Read next len characters from it.

6.  Print it.

Perform all above points again until null comes at an end.