当前位置:网站首页>C language -- three ways to realize student information management
C language -- three ways to realize student information management
2022-07-24 14:01:00 【Hair is not as much as code】
Catalog
Mode one Static implementation
Initialize student information
Search for student information
Mode two Dynamic implementation
Modify the information function
Mode three File operation implementation
Modify the information function
This program can be applied to 100 A student Information realization increase , Delete , lookup , modify , Exhibition , Sort These six functions
mis
Mode one Static implementation
Menu print function
void menu()
{
printf("**************************************\n");
printf("** 1. add 2. del **\n");
printf("** 3. search 4.modify **\n");
printf("** 5. show 6.sort **\n");
printf("** 0. exit **\n");
printf("**************************************\n");
}Initialize student information
struct People { char name[20]; int age; char sex[5]; char tele[12]; char addr[20]; }; struct Con { struct People data[100]; int count; };First establish two structures , One is used to store the information of each user , The other is to store everyone's information , Yes 100 All student information is initialized to 0
void Itni(struct Con* pc) { pc->count = 0; memset(pc->data, 0, sizeof(struct People)); }
Add student information
void Add(struct Con* pc) { if (pc->count == 100) { printf(" The address book is full , Unable to add \n"); return; } printf(" Please enter a name >:"); scanf("%s", pc->data[pc->count].name); printf(" Please enter age >:"); scanf("%d", &(pc->data[pc->count].age)); printf(" Please enter gender >:"); scanf("%s", pc->data[pc->count].sex); printf(" Please input the phone number >:"); scanf("%s", pc->data[pc->count].tele); printf(" Please enter the address >:"); scanf("%s", pc->data[pc->count].addr); pc->count++; printf(" Increase success \n"); }First determine whether the address book is full , If it is not full, it will increase
Delete student information
int Fine_by_name(char *name, struct Con* pc) { int i = 0; for (i = 0; i < pc->count; i++) { if (strcmp(name, pc->data[i].name) == 0) return i; } return -1; } void Del(struct Con* pc) { if (pc->count == 0) { printf(" Address book is empty , Cannot delete \n"); return; } char arr[20]; printf(" Please enter the name of the person to delete >:"); scanf("%s", arr); int k=Fine_by_name(arr,pc); if (k != -1) { int i = k; for (i = k; i < pc->count - 1; i++) { pc->data[i] = pc->data[i + 1]; } pc->count--; printf(" Delete successful \n"); } else printf(" The user does not exist \n"); }Before deleting, check whether the address book is empty , If not be empty , Then find the student information first , Then move the following data forward
Search for student information
int Fine_by_name(char *name, struct Con* pc) { int i = 0; for (i = 0; i < pc->count; i++) { if (strcmp(name, pc->data[i].name) == 0) return i; } return -1; } void Search(struct Con* pc) { if (pc->count == 0) { printf(" Address book is empty , Can't find \n"); return; } char arr[20]; printf(" Please enter the name of the person you want to find >:"); scanf("%s", arr); int k = Fine_by_name(arr, pc); if (k != -1) { printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address "); printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[k].name, pc->data[k].age, pc->data[k].sex, pc->data[k].tele, pc->data[k].addr); } else printf(" The user does not exist \n"); }Before searching, you should also judge whether the address book is empty , If it is not empty, search by name , Find the student information and print it
Modify student information
int Fine_by_name(char *name, struct Con* pc) { int i = 0; for (i = 0; i < pc->count; i++) { if (strcmp(name, pc->data[i].name) == 0) return i; } return -1; } void Modify(struct Con* pc) { if (pc->count == 0) { printf(" Address book is empty , Can't modify \n"); return; } char arr[20]; printf(" Please enter the name of the person to modify >:"); scanf("%s", arr); int k = Fine_by_name(arr, pc); if (k != -1) { printf(" Please enter a name >:"); scanf("%s", pc->data[k].name); printf(" Please enter age >:"); scanf("%d", &(pc->data[k].age)); printf(" Please enter gender >:"); scanf("%s", pc->data[k].sex); printf(" Please input the phone number >:"); scanf("%s", pc->data[k].tele); printf(" Please enter the address >:"); scanf("%s", pc->data[k].addr); } else printf(" The user does not exist \n"); }Judge whether it is empty first , If it is empty, exit , If it is not empty, find the student by name , Find it and modify it
Show student information
void Show(struct Con* pc) { int i = 0; printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address "); for (i = 0; i < pc->count; i++) { printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[i].name, pc->data[i].age, pc->data[i].sex, pc->data[i].tele, pc->data[i].addr); } }Print student information directly
Sort student information
char cmp(void* e1, void* e2) { return *((char*)e1) - *((char*)e2); } void Sort(struct Con* pc) { qsort(pc->data, pc->count, sizeof(struct People), cmp); printf(" Sort success \n"); }Use the quick line , Sort student names
test.c
#include"contact.h"
void menu()
{
printf("**************************************\n");
printf("** 1. add 2. del **\n");
printf("** 3. search 4.modify **\n");
printf("** 5. show 6.sort **\n");
printf("** 0. exit **\n");
printf("**************************************\n");
}
int main()
{
int input;
struct Con infor;
Itni(&infor);
do
{
menu();
printf(" Please select >:");
scanf("%d", &input);
switch (input)
{
case 1:
Add(&infor);
break;
case 2:
Del(&infor);
break;
case 3:
Search(&infor);
break;
case 4:
Modify(&infor);
break;
case 5:
Show(&infor);
break;
case 6:
Sort(&infor);
break;
case 0:
printf(" sign out \n");
break;
}
} while (input);
return 0;
}contact.c
#include"contact.h"
void Itni(struct Con* pc)
{
pc->count = 0;
memset(pc->data, 0, sizeof(struct People));
}
void Add(struct Con* pc)
{
if (pc->count == 100)
{
printf(" The address book is full , Unable to add \n");
return;
}
printf(" Please enter a name >:");
scanf("%s", pc->data[pc->count].name);
printf(" Please enter age >:");
scanf("%d", &(pc->data[pc->count].age));
printf(" Please enter gender >:");
scanf("%s", pc->data[pc->count].sex);
printf(" Please input the phone number >:");
scanf("%s", pc->data[pc->count].tele);
printf(" Please enter the address >:");
scanf("%s", pc->data[pc->count].addr);
pc->count++;
printf(" Increase success \n");
}
void Show(struct Con* pc)
{
int i = 0;
printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address ");
for (i = 0; i < pc->count; i++)
{
printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[i].name, pc->data[i].age, pc->data[i].sex, pc->data[i].tele, pc->data[i].addr);
}
}
int Fine_by_name(char *name, struct Con* pc)
{
int i = 0;
for (i = 0; i < pc->count; i++)
{
if (strcmp(name, pc->data[i].name) == 0)
return i;
}
return -1;
}
void Del(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Cannot delete \n");
return;
}
char arr[20];
printf(" Please enter the name of the person to delete >:");
scanf("%s", arr);
int k=Fine_by_name(arr,pc);
if (k != -1)
{
int i = k;
for (i = k; i < pc->count - 1; i++)
{
pc->data[i] = pc->data[i + 1];
}
pc->count--;
printf(" Delete successful \n");
}
else
printf(" The user does not exist \n");
}
void Search(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Can't find \n");
return;
}
char arr[20];
printf(" Please enter the name of the person you want to find >:");
scanf("%s", arr);
int k = Fine_by_name(arr, pc);
if (k != -1)
{
printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address ");
printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[k].name, pc->data[k].age, pc->data[k].sex, pc->data[k].tele, pc->data[k].addr);
}
else
printf(" The user does not exist \n");
}
void Modify(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Can't modify \n");
return;
}
char arr[20];
printf(" Please enter the name of the person to modify >:");
scanf("%s", arr);
int k = Fine_by_name(arr, pc);
if (k != -1)
{
printf(" Please enter a name >:");
scanf("%s", pc->data[k].name);
printf(" Please enter age >:");
scanf("%d", &(pc->data[k].age));
printf(" Please enter gender >:");
scanf("%s", pc->data[k].sex);
printf(" Please input the phone number >:");
scanf("%s", pc->data[k].tele);
printf(" Please enter the address >:");
scanf("%s", pc->data[k].addr);
}
else
printf(" The user does not exist \n");
}
char cmp(void* e1, void* e2)
{
return *((char*)e1) - *((char*)e2);
}
void Sort(struct Con* pc)
{
qsort(pc->data, pc->count, sizeof(struct People), cmp);
printf(" Sort success \n");
}contact.h
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
struct People
{
char name[20];
int age;
char sex[5];
char tele[12];
char addr[20];
};
struct Con
{
struct People data[100];
int count;
};
void Itni(struct Con* pc);
void Add(struct Con* pc);
void Show(struct Con* pc);
void Del(struct Con* pc);
void Search(struct Con* pc);
void Modify(struct Con* pc);
void Sort(struct Con* pc);Mode two Dynamic implementation
At the beginning 3 Personal capacity , When the capacity is full , If you want to add information , Each time you add 2 Bit capacity
Menu print function
void menu()
{
printf("**************************************\n");
printf("** 1. add 2. del **\n");
printf("** 3. search 4.modify **\n");
printf("** 5. show 6.sort **\n");
printf("** 0. exit **\n");
printf("**************************************\n");
}Initialization function
struct People { char name[20]; int age; char sex[5]; char tele[12]; char addr[20]; }; struct Con { struct People *data; int count; int capacity; };Static implementation , Before initialization, we give the second structure , Created 100 An array , For storing personal information , But dynamic development doesn't need to do this , We are opening up space during initialization , therefore Con The interior of the structure needs to be modified , Set a pointer to personal information
void Itni(struct Con* pc) { pc->count = 0; pc->data=(struct People*)malloc(sizeof(struct People)*3); if (pc->data == NULL) { printf("%s", perror); } pc->capacity = 3; }Use dynamic development first 3 Space for personal information , Then set the capacity to 3, Because at this time, it just opens up space , No personal information is stored , therefore count yes 0,conut It is used to count the number of people stored
Add student information
void Check(struct Con* pc) { if (pc->capacity == pc->count) { struct Con* str = (struct Con*)realloc(pc->data, sizeof(struct People) * (pc->capacity + 2)); if (str == NULL) { printf("%s", strerror(errno)); } else { pc->data = str; } pc->capacity += 3; printf(" Successful expansion \n"); } } void Add(struct Con* pc) { Check(pc); printf(" Please enter a name >:"); scanf("%s", pc->data[pc->count].name); printf(" Please enter age >:"); scanf("%d", &(pc->data[pc->count].age)); printf(" Please enter gender >:"); scanf("%s", pc->data[pc->count].sex); printf(" Please input the phone number >:"); scanf("%s", pc->data[pc->count].tele); printf(" Please enter the address >:"); scanf("%s", pc->data[pc->count].addr); pc->count++; printf(" Increase success \n"); }Before adding , We should judge first count Is less than capacity, That is to judge whether the current capacity is full , If the capacity is full , We open up 2 Personal space . Then type in the information
Delete information function
void Del(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Cannot delete \n");
return;
}
char arr[20];
printf(" Please enter the name of the person to delete >:");
scanf("%s", arr);
int k=Fine_by_name(arr,pc);
if (k != -1)
{
int i = k;
for (i = k; i < pc->count - 1; i++)
{
pc->data[i] = pc->data[i + 1];
}
pc->count--;
printf(" Delete successful \n");
}
else
printf(" The user does not exist \n");
}Find personal information
void Search(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Can't find \n");
return;
}
char arr[20];
printf(" Please enter the name of the person you want to find >:");
scanf("%s", arr);
int k = Fine_by_name(arr, pc);
if (k != -1)
{
printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address ");
printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[k].name, pc->data[k].age, pc->data[k].sex, pc->data[k].tele, pc->data[k].addr);
}
else
printf(" The user does not exist \n");
}Modify the information function
void Modify(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Can't modify \n");
return;
}
char arr[20];
printf(" Please enter the name of the person to modify >:");
scanf("%s", arr);
int k = Fine_by_name(arr, pc);
if (k != -1)
{
printf(" Please enter a name >:");
scanf("%s", pc->data[k].name);
printf(" Please enter age >:");
scanf("%d", &(pc->data[k].age));
printf(" Please enter gender >:");
scanf("%s", pc->data[k].sex);
printf(" Please input the phone number >:");
scanf("%s", pc->data[k].tele);
printf(" Please enter the address >:");
scanf("%s", pc->data[k].addr);
}
else
printf(" The user does not exist \n");
}Display information function
void Show(struct Con* pc)
{
int i = 0;
printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address ");
for (i = 0; i < pc->count; i++)
{
printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[i].name, pc->data[i].age, pc->data[i].sex, pc->data[i].tele, pc->data[i].addr);
}
}Information sorting function
char cmp(void* e1, void* e2)
{
return *((char*)e1) - *((char*)e2);
}
void Sort(struct Con* pc)
{
qsort(pc->data, pc->count, sizeof(struct People), cmp);
printf(" Sort success \n");
}Free dynamic memory
void Destory(struct Con* pc)
{
free(pc->data);
pc->data= NULL;
}Mode three File operation implementation
Save the data and read the last data when the program runs again
Information saving function
void Save(struct Con* pc)
{
FILE* Pfwrite = fopen("contact.txt", "wb");
if (Pfwrite == NULL)
{
return 1;
}
int i = 0;
for (i = 0; i < pc->count; i++)
{
fwrite(pc->data+i, sizeof(struct People), 1, Pfwrite);
}
fclose(Pfwrite);
printf(" Saved successfully \n");
}Initialization function
void Loadcontact(struct Con* pc)
{
FILE* Pfread =fopen ("contact.txt", "rb");
if (Pfread == NULL)
{
return 1;
}
struct People tmp = { 0 };
while (fread(&tmp, sizeof(struct People),1, Pfread) == 1)
{
Check(pc);
pc->data[pc->count] = tmp;
pc->count++;
}
fclose(Pfread);
Pfread = NULL;
}
void Itni(struct Con* pc)
{
pc->count = 0;
pc->data=(struct People*)malloc(sizeof(struct People)*3);
if (pc->data == NULL)
{
printf("%s", strerror(errno));
}
pc->capacity = 3;
Loadcontact(pc);
}Here, you need to open the file when initializing , Read the last data
Add information function
void Add(struct Con* pc)
{
Check(pc);
printf(" Please enter a name >:");
scanf("%s", pc->data[pc->count].name);
printf(" Please enter age >:");
scanf("%d", &(pc->data[pc->count].age));
printf(" Please enter gender >:");
scanf("%s", pc->data[pc->count].sex);
printf(" Please input the phone number >:");
scanf("%s", pc->data[pc->count].tele);
printf(" Please enter the address >:");
scanf("%s", pc->data[pc->count].addr);
pc->count++;
printf(" Increase success \n");
}Delete information function
void Del(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Cannot delete \n");
return;
}
char arr[20];
printf(" Please enter the name of the person to delete >:");
scanf("%s", arr);
int k=Fine_by_name(arr,pc);
if (k != -1)
{
int i = k;
for (i = k; i < pc->count - 1; i++)
{
pc->data[i] = pc->data[i + 1];
}
pc->count--;
printf(" Delete successful \n");
}
else
printf(" The user does not exist \n");
}Find information function
void Search(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Can't find \n");
return;
}
char arr[20];
printf(" Please enter the name of the person you want to find >:");
scanf("%s", arr);
int k = Fine_by_name(arr, pc);
if (k != -1)
{
printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address ");
printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[k].name, pc->data[k].age, pc->data[k].sex, pc->data[k].tele, pc->data[k].addr);
}
else
printf(" The user does not exist \n");
}Modify the information function
void Modify(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Can't modify \n");
return;
}
char arr[20];
printf(" Please enter the name of the person to modify >:");
scanf("%s", arr);
int k = Fine_by_name(arr, pc);
if (k != -1)
{
printf(" Please enter a name >:");
scanf("%s", pc->data[k].name);
printf(" Please enter age >:");
scanf("%d", &(pc->data[k].age));
printf(" Please enter gender >:");
scanf("%s", pc->data[k].sex);
printf(" Please input the phone number >:");
scanf("%s", pc->data[k].tele);
printf(" Please enter the address >:");
scanf("%s", pc->data[k].addr);
}
else
printf(" The user does not exist \n");
}Display information function
void Show(struct Con* pc)
{
int i = 0;
printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address ");
for (i = 0; i < pc->count; i++)
{
printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[i].name, pc->data[i].age, pc->data[i].sex, pc->data[i].tele, pc->data[i].addr);
}
}Information sorting function
char cmp(void* e1, void* e2)
{
return *((char*)e1) - *((char*)e2);
}
void Sort(struct Con* pc)
{
qsort(pc->data, pc->count, sizeof(struct People), cmp);
printf(" Sort success \n");
}Free dynamic memory
void Destory(struct Con* pc)
{
free(pc->data);
pc->data= NULL;
}test.c
#include"contact.h"
void menu()
{
printf("**************************************\n");
printf("** 1. add 2. del **\n");
printf("** 3. search 4.modify **\n");
printf("** 5. show 6.sort **\n");
printf("** 0. exit **\n");
printf("**************************************\n");
}
int main()
{
int input;
struct Con infor;
Itni(&infor);
do
{
menu();
printf(" Please select >:");
scanf("%d", &input);
switch (input)
{
case 1:
Add(&infor);
break;
case 2:
Del(&infor);
break;
case 3:
Search(&infor);
break;
case 4:
Modify(&infor);
break;
case 5:
Show(&infor);
break;
case 6:
Sort(&infor);
break;
case 0:
Save(&infor);
Destory(&infor);
printf(" sign out \n");
break;
}
} while (input);
return 0;
}contact.c
#include"contact.h"
void Check(struct Con* pc)
{
if (pc->capacity == pc->count)
{
struct Con* str = (struct Con*)realloc(pc->data, sizeof(struct People) * (pc->capacity + 2));
if (str == NULL)
{
printf("%s", strerror(errno));
}
else
{
pc->data = str;
pc->capacity = pc->capacity +2;
printf(" Successful expansion \n");
}
}
}
void Loadcontact(struct Con* pc)
{
FILE* Pfread =fopen ("contact.txt", "rb");
if (Pfread == NULL)
{
return 1;
}
struct People tmp = { 0 };
while (fread(&tmp, sizeof(struct People),1, Pfread) == 1)
{
Check(pc);
pc->data[pc->count] = tmp;
pc->count++;
}
fclose(Pfread);
Pfread = NULL;
}
void Itni(struct Con* pc)
{
pc->count = 0;
pc->data=(struct People*)malloc(sizeof(struct People)*3);
if (pc->data == NULL)
{
printf("%s", strerror(errno));
}
pc->capacity = 3;
Loadcontact(pc);
}
void Add(struct Con* pc)
{
Check(pc);
printf(" Please enter a name >:");
scanf("%s", pc->data[pc->count].name);
printf(" Please enter age >:");
scanf("%d", &(pc->data[pc->count].age));
printf(" Please enter gender >:");
scanf("%s", pc->data[pc->count].sex);
printf(" Please input the phone number >:");
scanf("%s", pc->data[pc->count].tele);
printf(" Please enter the address >:");
scanf("%s", pc->data[pc->count].addr);
pc->count++;
printf(" Increase success \n");
}
void Destory(struct Con* pc)
{
free(pc->data);
pc->data= NULL;
}
void Show(struct Con* pc)
{
if (pc->count == 0)
{
printf(" The address book bit is empty \n");
return;
}
else
{
int i = 0;
printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address ");
for (i = 0; i < pc->count; i++)
{
printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[i].name, pc->data[i].age, pc->data[i].sex, pc->data[i].tele, pc->data[i].addr);
}
}
}
int Fine_by_name(char *name, struct Con* pc)
{
int i = 0;
for (i = 0; i < pc->count; i++)
{
if (strcmp(name, pc->data[i].name) == 0)
return i;
}
return -1;
}
void Del(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Cannot delete \n");
return;
}
char arr[20];
printf(" Please enter the name of the person to delete >:");
scanf("%s", arr);
int k=Fine_by_name(arr,pc);
if (k != -1)
{
int i = k;
for (i = k; i < pc->count - 1; i++)
{
pc->data[i] = pc->data[i + 1];
}
pc->count--;
printf(" Delete successful \n");
}
else
printf(" The user does not exist \n");
}
void Search(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Can't find \n");
return;
}
char arr[20];
printf(" Please enter the name of the person you want to find >:");
scanf("%s", arr);
int k = Fine_by_name(arr, pc);
if (k != -1)
{
printf("%20s\t%5s\t%5s\t%12s\t%30s\n", " name ", " Age ", " Gender ", " Telephone ", " address ");
printf("%20s\t%3d\t%5s\t%12s\t%30s\n", pc->data[k].name, pc->data[k].age, pc->data[k].sex, pc->data[k].tele, pc->data[k].addr);
}
else
printf(" The user does not exist \n");
}
void Modify(struct Con* pc)
{
if (pc->count == 0)
{
printf(" Address book is empty , Can't modify \n");
return;
}
char arr[20];
printf(" Please enter the name of the person to modify >:");
scanf("%s", arr);
int k = Fine_by_name(arr, pc);
if (k != -1)
{
printf(" Please enter a name >:");
scanf("%s", pc->data[k].name);
printf(" Please enter age >:");
scanf("%d", &(pc->data[k].age));
printf(" Please enter gender >:");
scanf("%s", pc->data[k].sex);
printf(" Please input the phone number >:");
scanf("%s", pc->data[k].tele);
printf(" Please enter the address >:");
scanf("%s", pc->data[k].addr);
}
else
printf(" The user does not exist \n");
}
char cmp(void* e1, void* e2)
{
return *((char*)e1) - *((char*)e2);
}
void Sort(struct Con* pc)
{
qsort(pc->data, pc->count, sizeof(struct People), cmp);
printf(" Sort success \n");
}
void Save(struct Con* pc)
{
FILE* Pfwrite = fopen("contact.txt", "wb");
if (Pfwrite == NULL)
{
return 1;
}
int i = 0;
for (i = 0; i < pc->count; i++)
{
fwrite(pc->data+i, sizeof(struct People), 1, Pfwrite);
}
fclose(Pfwrite);
printf(" Saved successfully \n");
}contact.h
#include<stdio.h>
#include<string.h>
#include<errno.h>
#include<stdlib.h>
struct People
{
char name[20];
int age;
char sex[5];
char tele[12];
char addr[20];
};
struct Con
{
struct People *data;
int count;
int capacity;
};
void Itni(struct Con* pc);
void Add(struct Con* pc);
void Show(struct Con* pc);
void Del(struct Con* pc);
void Search(struct Con* pc);
void Modify(struct Con* pc);
void Sort(struct Con* pc);
void Destory(struct Con* pc);
void Save(struct Con* pc);边栏推荐
- Network security - file upload whitelist bypass
- 5年接触近百位老板,身为猎头的我,发现升职的秘密不过4个字
- Packet switching and label switching in MPLS
- NOIP2021 T2 数列
- Add an element to the object array with unshift
- Cocoapod installation problems
- Multithreaded common classes
- Nessus安全测试工具使用教程
- Sringboot plugin framework implements pluggable plug-in services
- R语言检验样本比例:使用prop.test函数执行单样本比例检验计算总体中成功样本比例p值的置信区间
猜你喜欢

Unity行人随机行走不碰撞

rhcsa第六次笔记

OWASP ZAP安全测试工具使用教程(高级)

position: -webkit-sticky; /* for Safari */ position: sticky;

Error importing header file to PCH

Source code analysis of ArrayList

Rhcsa sixth note

Network security - file upload competitive conditions bypass

Network security - use exchange SSRF vulnerabilities in combination with NTLM trunking for penetration testing

Nessus安全测试工具使用教程
随机推荐
String - 459. Repeated substrings
数据类型二进制字符串类型
栈与队列——225. 用队列实现栈
Network security - file upload competitive conditions bypass
Error importing header file to PCH
Network security - file upload content check bypass
Stack and queue - 225. Implement stack with queue
Flinktable & SQL (VII)
Data modification modification
Network security - penetration using evil maid physical access security vulnerabilities
Default color setting in uiswitch off state
Build ZABBIX monitoring service in LNMP architecture
OWASP ZAP安全测试工具使用教程(高级)
CAS atomic type
Flink fault tolerance mechanism (V)
R语言使用epiDisplay包的dotplot函数通过点图的形式可视化不同区间数据点的频率、使用by参数指定分组参数可视化不同分组的点图分布、使用cex.Y.axis参数指定Y轴分组标签文本的大小
Solve the problem of repeated clicking of button uibutton
Csp2021 T3 palindrome
使用树莓派做Apache2 HA实验
Remove the treasure box app with the green logo that cannot be deleted from iPhone