Now that we have assigned values to the six simple variables, we can do anything we desire with them. In order to keep this first example simple, we will simply print out the values to see if they really do exist as assigned. If you carefully inspect the "printf" statements, you will see that there is nothing special about them. The compound name of each variable is specified because that is the only valid name by which we can refer to these variables.
Structures are a very useful method of grouping data together in order to make a program easier to write and understand.
This first example is too simple to give you even a hint of the value of using structures, but continue on through these lessons and eventually you will see the value of using structures.
Compile and run struct1.c and observe the output.
Structures are a very useful method of grouping data together in order to make a program easier to write and understand.
This first example is too simple to give you even a hint of the value of using structures, but continue on through these lessons and eventually you will see the value of using structures.
Compile and run struct1.c and observe the output.