-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphonebook_skeleton.c
56 lines (44 loc) · 1.08 KB
/
phonebook_skeleton.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/**
* Phonebook is a simple phonebook application. Store pairs of names and numbers and then look them up.
*/
#define NAME_LENGTH 20
#define NUMBER_LENGTH 20
#define PHONEBOOK_LENGTH 100
#define COMMAND_LENGTH 5
/**
* A single contact, which has a name and phone number.
*/
struct contact {
};
typedef struct contact Contact;
/**
* The phonebook, which stores a number of contacts and keeps track of how many contacts it contains.
*/
struct phonebook {
};
typedef struct phonebook Phonebook;
/**
* Prompt the user for a name and number, then add them to the phonebook.
*/
void add_contact(Phonebook *p) {
}
/**
* Prompt the user for a name, then display any matching records in the phonebook.
*/
void show_contact(Phonebook *p) {
}
/**
* Display all records in the phonebook.
*/
void display_phonebook(Phonebook *p) {
}
/**
* Read commands from the user's input and dispatch to the appropriate functions.
*/
int main() {
Phonebook p;
printf("Welcome to the phone book. You can add or lookup contacts. (A/L).\n");
}