Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- struct EEE
- {
- char szName[99];
- int nOld;
- char szTelNumb[24];
- EEE(){
- strcpy(szName, "None");
- nOld = -1;
- strcpy(szTelNumb, "Not set");
- }
- } ;
- void print_man(EEE *);
- ////////////////////////////////////////////////////
- int main() //
- {
- EEE e[500];
- int select;
- strcpy(e[1].szName, "Efim");
- e[1].nOld = 12;
- strcpy(e[1].szTelNumb, "+7-911-455-1945");
- strcpy(e[2].szName, "Ilya");
- e[2].nOld = 9;
- strcpy(e[2].szTelNumb, "+7-953-566-46-14");
- strcpy(e[21].szName, "Kozlova Natalia");
- e[21].nOld = 50;
- strcpy(e[21].szTelNumb, "+7-000-222-11-11");
- printf(" 1: %s \n", e[ 1].szName);
- printf(" 2: %s \n", e[ 2].szName);
- printf("21: %s \n", e[21].szName);
- printf("For more information, select the person's number: ");
- scanf("%d", &select);
- print_man(&e[select]);
- }
- /////////////////////////////////////////////////////
- void print_man(EEE *p)
- {
- printf(" His name = %s \n", p-> szName);
- printf(" Age = %d \n", p-> nOld );
- printf("Telephone: %s \n", p->szTelNumb);
- printf(" - - - - - - - - - - - - - \n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement