How to use c language to realize a phone book
This article mainly explains "how to use c language to achieve a phone book". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought. Let's study and learn "how to use C language to achieve a phone book"!
Let's take a look at the effect of this Mini Program first.
Here, for the convenience of the demonstration, I fixed the number of people to three.
The number of people can be customized.
Here is this simple code:
# includetypedef struct con {int num; char name [11]; char tel [10];} contact;int main () {contact con [3]; int i; for