Back to Previous Lecture
Up to Main Page
Forward to Next Lecture
The program arith.c shows you how to perform a variety of arithmetic operations. It asks the user for two integer numbers, then adds, subtracts, multiplies and divides them, as well as uses the modulo operation.
The program getinfo.c from the pervious lecture has been improved here by adding our own include file which defines the maximum size for the name fields. We can change the size in the include file, then recompile the program and not have to change the actual source file. This is often handy when you have a lot of references to certain values that may change over the lifetime of the program.
Back to Previous Lecture
Up to Main Page
Forward to Next Lecture