当前位置:网站首页>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);边栏推荐
- String - 459. Repeated substrings
- R语言使用epiDisplay包的dotplot函数通过点图的形式可视化不同区间数据点的频率、使用by参数指定分组参数可视化不同分组的点图分布、使用cex.Y.axis参数指定Y轴分组标签文本的大小
- Network security - file upload content check bypass
- 通配符(泛域名)SSL证书
- OWASP zap security testing tool tutorial (Advanced)
- 【无标题】rhcsa第一次作业
- Flink comprehensive case (IX)
- Nmap security testing tool tutorial
- SQL subquery
- Network security -- Service Vulnerability scanning and utilization
猜你喜欢

Network security - use exchange SSRF vulnerabilities in combination with NTLM trunking for penetration testing
![[untitled] rhcsa first operation](/img/ba/6b9c11edbc18ffb52f6046360b5b10.png)
[untitled] rhcsa first operation

How to quickly wrap lines in Excel table

Concurrent programming ----------- set

OWASP zap security testing tool tutorial (Advanced)

About the flicker problem caused by using universalimageloader to load pictures and refresh data in recyclerview

Flex layout

Nmap安全测试工具使用教程

Network security - file upload content check bypass

After five years of contact with nearly 100 bosses, as a headhunter, I found that the secret of promotion was only four words
随机推荐
Multithreaded common classes
On the number of solutions of indefinite equations
JQ remove an element style
Error reported when using activiti to create a database table
Source code analysis of ArrayList
Afnetworking data raw request mode
Wildcard (Pan domain name) SSL certificate
R语言使用epiDisplay包的statStack函数基于因子变量通过分层的方式查看连续变量的统计量(均值、中位数等)以及对应的假设检验、对连续数据进行对数化之后符合参数检验条件自动执行参数检验
Editor formula
The R language uses the DOTPLOT function of epidisplay package to visualize the frequency of data points in different intervals in the form of point graphs, uses the by parameter to specify the groupi
通配符(泛域名)SSL证书
Csp2021 T3 palindrome
数据类型二进制字符串类型
Network security - Cookie injection
Network security - filtering bypass injection
达梦实时主备集群搭建
Some simple commands
CSP2021 T1 廊桥分配
Network security - use exchange SSRF vulnerabilities in combination with NTLM trunking for penetration testing
5年接触近百位老板,身为猎头的我,发现升职的秘密不过4个字