
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Network programming lab 3, focusing on file handling and dynamic memory allocation. Students are required to create a file containing ip addresses and port numbers using structures and display the contents. Task 1 involves making a file through dynamic memory allocation, while task 2 requires opening an existing file in read-only mode and displaying its ip addresses and port numbers.
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Go through the topic File handling then perform the following tasks.
Through dynamic memory allocation make a file of port # & IP address. The port # & IP address will be entered by user using structures.
Struct1line{
Char IP;
int port;
};
TASK #2:
Create a file by your own open it in read only mode. And display its IP address a and port numbers and display them on screen in the same format.