Next: Multiple Choice Questions
Up: A simple C++ program
Previous: Programming Style
main()
.
//
and
the end of the line are ignored by the compiler.
int
is used for whole numbers which are
represented exactly within the computer.
float
is used for real (decimal) numbers. They
are held to a limited accuracy within the computer.
char
is used to represent single characters. A
char
constant is enclosed in single quotation marks.
"
.
cin >>
variable-identifier.
cout <<
output-list.
Items in the output list are separated by <<
.