Find Jobs
Hire Freelancers

c program using ointers, malloc free, file operations, printf and scanf

$30-50 USD

Completed
Posted about 22 years ago

$30-50 USD

Paid on delivery
Part A In this part you are to write a C program which mimics the functionality of a friends list. A friends list is often used by users on hosts to identify if any friends are logged on at the same time. A friends list should always report the name of the friend, the username of the friend, the time the friend logged onto the host, whether or not the friend accepts talk sessions and where the friend is logged on from (normally the name or address of a computer). An example piece of output would be: UserID Name Talk Login Time Location joey Joe Blogg No Mon 9:20 [login to view URL] fish Fish Man Yes Mon 0:30 [login to view URL] To generate this friends list you are going to use the program finger. The output from the finger program should be taken and piped into your program. Using this information as the basis you perform the following steps. Step 1. Write a C source file and header which is used to implement a linked list. The files should be named linkedlist.c and linkedlist.h. Your linked list should only need an insert and find/search function. The find/search function will print nodes and associated data for keys that match. The key is [login to view URL] node of the linked list should contain the following information deemed essential to solve the friends list problem. struct linkednode { char* realname; // the person real name from the NAME field char[9] username; // the person username from the LOGIN field int talk; // does the person accept talk sessions int idle_time; // the idle_time in minutes from the IDLE field char* where; // the persons location from the WHERE field char* logintime; // The login time from the WHEN field. }; Each node should also contain information essential to the management of the list (think about how linked lists are represented in code). Once you have implemented your linked list, using a similar node structure to the one above, write a simple driver program called main.c, which populates the list with arbitrary data and can search the list for a particular user (search is based on the username). The search should report ALL nodes which are related to that user and all information kept in them. The search is performed on the key username. You do not need to submit this main.c file. Step 2. The finger program generates the following output; $ finger Login Name TTY Idle When Where david David Wilson *console 4:04 Wed 14:09 dma Donna Ashelford pts/1 16 Sat 12:24 [login to view URL] yi ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased. program should run under unix environment ## Platform unix and c ## Deadline information i need this done within a day
Project ID: 2846130

About the project

2 proposals
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$38.25 USD in 14 days
5.0 (33 reviews)
4.0
4.0
2 freelancers are bidding on average $40 USD for this job
User Avatar
See private message.
$42.50 USD in 14 days
4.9 (35 reviews)
3.9
3.9

About the client

Flag of AUSTRALIA
Australia
5.0
3
Member since Oct 2, 2001

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.