double a = 20.3; int b; char c; b = 3; c = 4*a + b;
expression | type | value |
a + b | ||
b / 4 | ||
b % 4 | ||
c | ||
int(c) | ||
b = a |
cout << (2.5*4)/5 << endl << 2.5*(4/5) << endl;
00101010
. If we interpret that byte as a
char
, what character does it represent?
Input a 3-letter word in uppercase letters: CAT Output: catHint: look at the ASCII table and think about how to go from the ASCII value of a uppercase letter to the ASCII value of the same letter in lowercase.
Note: You MUST name your program hw.cpp. To avoid confusion, place this in a ic210/hw05 directory. This will be last time we make this point about directories and filenames, so remember it! For future homeworks, look ahead to the given "submit" command to verify what your program should be named.
Submit
~/bin/submit -c=IC210 -p=hw05 hw.cppTurn in A printout of this cover sheet and the codeprint of hw.cpp