-
Notifications
You must be signed in to change notification settings - Fork 1
Named constants
Mr. Daehn edited this page Aug 18, 2017
·
1 revision
Unlike variables, whose values can change during program execution, named constants have values that do not change. The declaration of a named constant is like that of an initialized variable, but the keyword const
precedes the data type. For example,
const double PI = 3.14159;
declares PI
as a named floating constant.
James R. Daehn, Per-course Faculty
Missouri State University
Department of Computer Science