You must “declare” every variable in a C program by stating its name and type. If you refer to an undeclared variable, QuickC displays an error message when you compile the program.
The following statement from VOLUME.C declares a float (floating-point) type variable named volume:
float volume;
After declaring a variable, you should “initialize” it—give it an initial value—before using it. Uninitialized variables might have any value, so they are dangerous to use. The VOLUME.C program initializes the variable volume by as- signing it the return value from a function call:
volume = sphere( radius );
You can also initialize a variable when it is declared, a convenient and common practice. The following statement from VOLUME.C declares the variable radius as an int (integer) variable and initializes it with the value 3:
int radius = 3;