Objectives•Non-numeric data types•Input “statement”•Input Buffer•Formatting output4002-208Page 2
Boolean Data Type•bool–1 byte that encodes trueor false–The value 0 represents false.–All other values represent true.•Examples–bool hasFleas = true;–bool endOfFile = 1; //set to true//better to use true or falsePage 34002-208
has intentionally blurred sections.
Sign up to view the full version.
char Data Type•A char holds only one character•Enclose character in single quotes•Example: char gender = ‘f’;•The escape character (‘\’) indicates the following character has special meaning–‘\n’ is the newline character–‘\t’ is the tab character•Only one character in memory.4002-208Page 4