Kamis, 20 April 2017

How can you have array of structures in C Programming

We use structures to describe the format of a number of related variables. For example, we want to store details of 100 textbooks it will become difficult to declare and maintain 100 variables and store the data. Instead, we can declare and array of structure variables as shown below: 1 2 3 4 5 6 7 struct textbook { char name; char author; int pages; } struct textbook book; In the above example, we are declaring an array book with 10 elements of the type textbook which is a structure. We can use the keyword typedef to define a structure

The post How can you have array of structures in C Programming appeared first on Coding Security.


How can you have array of structures in C Programming
read more

Tidak ada komentar:

Posting Komentar