{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

208 Day 04 String IO

208 Day 04 String IO - 4002-208 Intro to Prog[in C Day 04...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
4002-208 Intro. to Prog. [in C++] Day 04 Assignment Statement & Data Types
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Objectives Non-numeric data types Input “statement” Input Buffer Formatting output 4002-208 Page 2
Background image of page 2
Boolean Data Type bool 1 byte that encodes true or 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 false Page 3 4002-208
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
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-208 Page 4
Background image of page 4