Wednesday, November 2, 2011

Uses of Structures in C programming language

Where are structures useful? The immediate application that comes to the mind is Database Management. That is, to maintain data about employees in an organization, books in a library, items in a store, financial accounting transactions in a company etc. But mind you, use of structures stretches much beyond database
management. They can be used for a variety of purposes like:

(a)  Changing the size of the cursor
(b)  Clearing the contents of the screen
(c)  Placing the cursor at an appropriate position on screen
(d)  Drawing any graphics shape on the screen
(e)  Receiving a key from the keyboard
(f)  Checking the memory size of the computer
(g)  Finding out the list of equipment attached to the computer
(h)  Formatting a floppy
(i)  Hiding a file from the directory
(j)  Displaying the directory of a disk
(k)  Sending the output to printer
(l)  Interacting with the mouse

And that is certainly a very impressive list! At least impressive nough to make you realize how important a data type a structure is and to be thorough with it if you intend to program any of the above applications. Some of these applications would be discussed in Chapters 16 to 19.
 
 

No comments:

Post a Comment