首页 > > 详细

Algorithms留学生讲解、辅导C language、C/C++程序设计讲解、辅导UQAC code 辅导R语言程序|解析Java程序

Algorithms and C language
Homework 2
To be returned by Monday 10 June 2019
- You should send the source file and the executable file.
- Please, do not forget: your name, surname, your Tianjin code and UQAC code, as
well as your e-mail address if you have one.
- At most two names can appear on your homework copy.
Write a C program that does the following tasks each of which should be written as a
function:
1. Create a file FP that contains a set of persons structured each in a name of at most 30
characters and an integer to denote the age of that person.
2. Create a linked list from file FP in which each node has the following structure
struct node {
char name[20];
int age;
struct node *ptrnext;
}
3. Print on screen all the elements of the list each on a single line.
4. Delete all the occurrences to make the linked list contain only distinct names.
5. Print on screen all the elements of the list each on a line
6. Input from the keyboard a set of elements such that:
- If the new element already exists in the list, then insert it into the end of
the list.
- It the new element does not exist in the list, then insert it into the position
just before the element with the nearest age from below.
7. Print on screen all the elements of the resulted list each on a single line.
8. Print all the elements of the resulted list into file FP.
9. In the end of your program, destroy your linked list.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!