General Discussions

Learning Structures in C

You get admission to a college after clearing the entrance and you walk with several set of documents. The college admission department maintains several procedures and collects some certificates to return back at the time of graduation. Let us say there are like ten kinds of documents to be maintained for every student. Institute takes a decision that all documents of same kind will be put together in a single file. All transfer certificates one file, all fee receipts one file etc and so on. Then comes the days where students wanted to collect back their certificates. Every student had to visit nearly ten different files. Wow! Now that was weird and students started cursing the management. Management understood the problem and took a decision that all documents relating to one student will be in the same file.  Access was easy. The method was found to be beneficial and everyone was happy.

In the scenario explained above the first method was an array. The second was structures. It combine the heterogeneous data and puts together in the same block. You can see that real time data has components of all kinds. Array does not suffice to be an ideal solution. A better management of heterogeneous data is to use the structures.

More about structures can be understood by reading this free ebook:

Structures and C

Structures and C - LR

Let me Know What you Think!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s