Network Programming Lab 3: File Handling and Dynamic Memory Allocation, Exercises of Network Programming

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

2011/2012

Uploaded on 07/06/2012

duraid
duraid 🇮🇳

4.3

(3)

72 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
NETWORK PROGRAMMING LAB #3
Go through the topic File handling then perform the following tasks.
TASK #1:
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.
docsity.com

Partial preview of the text

Download Network Programming Lab 3: File Handling and Dynamic Memory Allocation and more Exercises Network Programming in PDF only on Docsity!

NETWORK PROGRAMMING LAB

Go through the topic File handling then perform the following tasks.

TASK #1:

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.

docsity.com