Skip to main content

Posts

Showing posts with the label Values and Statements

Values and Statements

First, a few definitions: •   A statement is a unit of code that does something –a basic building block of a program. •  An expression is a statement that has a value – for instance, a number, a string, the sum of two numbers, etc. 4+2, x-1, and "Hello, world!\n" are all expressions. Not every statement is an expression. It makes no sense to talk about the value of an #include statement, for instance.