answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

char sender[50],receiver[50];

int i,winsize;

clrscr();

printf("\n ENTER THE WINDOWS SIZE : ");

scanf("%d",&winsize);

printf("\n SENDER WINDOW IS EXPANDED TO STORE MESSAGE OR WINDOW \n");

printf("\n ENTER THE DATA TO BE SENT: ");

fflush(stdin);

gets(sender);

for(i=0;i<winsize;i++)

receiver[i]=sender[i];

receiver[i]=NULL;

printf("\n MESSAGE SEND BY THE SENDER:\n");

puts(sender);

printf("\n WINDOW SIZE OF RECEIVER IS EXPANDED\n");

printf("\n ACKNOWLEDGEMENT FROM RECEIVER \n");

for(i=0;i<winsize;i++);

printf("\n ACK:%d",i);

printf("\n MESSAGE RECEIVED BY RECEIVER IS : ");

puts(receiver);

printf("\n WINDOW SIZE OF RECEIVER IS SHRINKED \n");

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C code for sliding window protocol?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Sliding window protocol using 3 bit sequence number and maximum window size of 4 Starting window positions at A and B before any frames are sent?

i need program C for sliding window protocl


What is the C plus plus code for gpsr protocol?

http://enl.usc.edu/enl/trunk/gpsr-linux/docs/gpsr_design_spec.pdf


How can we print complete c program in the execution window every thing?

You cannot produce the source code from the machine code unless you use the source code as an input file which is output to the execution window. To output the machine code, treat the executable as an input file to itself.


How do you install a vertical window air conditioner?

Usually this means a casement window, and you have to remove the window frame altogether, and install a filler panel cut to fit the opening that is left. This does not sound true, I installed a Whirlpool casement style a/c in my sliding window of my bedroom, in an upper-story condo. I had a bit of problem as I wanted to bring the a/c unit a bit farther into the condo unit, so less was outside. I had to buy a longer portion of rod for the adjustment part of the a/c, so it would reach properly to the building outside to hold the unit at the proper tilt. I did not want to use any bolts going into the outside of the building, as this is a condo. The unit basically just sits between the open window edge and the side of the window. I hold the sliding window very securely shut against the a/c unit by using sliding window locks on the top and the bottom of the window - giving the a/c additional support. I also bought a long board that I painted and placed like a shelf in front of the a/c brackets, which I had placed outside the window ledge (on the inside of my condo). This was because I brought the unit a bit farther inside that one normally would, normally the bracket for the a/c would be going into the window channel. The painted board I placed in front of the exposed brackets I secured with metal brackets, held in by screws, going into the studs. This way the painted board keeps the a/c from falling backwards out of the window opening, along with the edge of the window (held my window locks) and the outside tilt pole, which rests against the building. Originally the manufacturer had a cheapo filler panel which closes the hole above the a/c unit. I noticed today this has disintegrated badly, so I am checking into cutting some plexiglass or something similar to close this opening, and be energy-efficient and keep birds and critters out.


What is the five C protocol?

[object Object]


What is the hink-pink for blue green moray?

TEAL EEL


Write a program for stop and wait protocol in implementing reliable transport protocol?

Take a look at any definition for TCP protocol. Most are also written in C.


What lower-layer protocol encapsulates SNMP messages?

nv c


In which language window vista is written?

mostly C# and C++


How does one install Office 2007?

Basically, you insert the disk and follow the instructions. You will be confronted by a product activation code prompt window. You insert the code that is somewhere on the box or the inner booklet inside the case. This code is unique. You then follow the on screen instructions again, which will usually present you with a T&amp;C acceptance window. Accept the T&amp;C and proceed with installation. There will be a window which appears with the option to 'upgrade' if you have an earlier version of the program, or an 'installation' option if you have no previous versions of the program. The installation begins and all you have to do is wait. Close when the installation is done to complete.


4 What type of droid is C-3P0 from Star Wars?

He is a protocol droid


How do you hide the drive c?

DRIVE C IS KNOEN AS WINDOW DRIVE,SO ITS DIFFICULT TO HIDE DRIVE C.... but if you wnt to do so ,then install your window inanother drive......