< Prev
Next >



Structure in C




Besides the primitive data types like int, char, float etc, C language provides us another data type called structure. By using, structure, C allow us to create a data type, which can be a collection of different primitive data type elements. To understand structure, let's take an example.


Let's suppose, we have to store a collection of information about a bag, such as -
Using structure we can create a data type which can be used a collection of different data types mentioned above. To understand structure, let's see how a structure is declared.




Please subscribe our social media channels for notifications, we post a new article everyday.

Decodejava Google+ Page Decodejava Facebook Page  DecodeJava Twitter Page

Coming Next
-
C++ and Python

Ad2