Professional Documents
Culture Documents
Algorithm:
Error Detection:
Source Code:
miluUL stdlo.hs
vtld mainc)
Cdaka itc
[7-C1
dat ut [7- c]
= =
o)
1,
olara uT 7-
1ok Cte CIz o
C7 +t
Chupuut
Cass 1:- ent 4.00 dafa me.lg 0n
mcoccc daba
entrt toe ecaiucel Urfs ne m
Algorithm-
Code:
mordcl dafe
11 1
1 17
Entu
Date: 0110912
Aim:
Write a C++t and C program respectively to implement the Stop and Wait Protocol and
Sliding Window Protocol.
Algorithm:
Stop and Wait Protocol:
Program
#incdutl e stalio. hs
# n u l cou0. hs
#mlude steltb.hs
rTll maumc)
o1 (x2 1, *2 L t2 t)
h n lC In u a i t ? fo1 7. d scconolt \ntp)
sleep Cra);
ln't),
ne'rt (" Pack fo1 ftavlas 9
0 a l c l )). so
nofaml= nofmU!
J++
nummbe d an A 10
sndiny ome is 2
4Jaltung &CCOYC
nauh
nah fo 2
SmCLeory AameS 3
waing 1cIma
auk fo f1ame as Y, a
fisme
stnadtig Aomu i 66nak fL sarne5
Date:1510l82
Aim
Implement the HDLC Protocol using C Languagge.
Algorithm:
Program:
#mdud 2 tdto.hs
t theludliE Auny:s
nt aavnt )
duilt ct'n)
Cact- =1) 17
Kt
(R =t1 alr7= =1R%k en R auné 25
Count t t
Cotunt=6)
S++
bESJ = 0
b Ey l=4Cil;
C+t
j+
uinCAtu a* Stuftg )
Output: U i l f
lluin 0 ' Cruut
Gnte ttee frannc 'ze
nt
O
Algorithm
Program:
inti
chaA sÖ C1001, data C1001;
carf C"LAR)
25
etetct
Output:
mt t u sMlu: kCa
ncyntl RLuG nf
Chooy
1: nctymt tiyptuy
28