Technical Foundations of Computer Science III System Programming (C)
Technical Foundations of Computer Science III System Programming (C)
• Variable definition
int integer1; /* first number to be input by user */
int integer2; /* second number to be input by user */
int sum; /* variable in which sum will be stored */
• The names integer1, integer2 and sum are the names of
variables. A variable is a location in memory where a
value can be stored for use by a program.
• These definitions specify that the variables integer1,
integer2 and sum are of type int, which means that these
variables will hold integer values, i.e., whole numbers
such as 7, –11, 0, 31914 and the like.
Continue...