Tuesday, February 28, 2017

MidTerm Review Spring 2017

9 t/f
20 multiple choice
char  extraction operator (>>) how it behaves.  
flag control while loop do you use bool value? yes
while loop ( ) <----- div="">
how many times does a for loop execute/iterate. for(int i = 1; i<5 4="" div="" false="" i="" is="" so="" times.="" whenever="">
know pre and post  ++x(pre)/x++(post)
o ex.1
o x = 5;
o x++ = 5 //x = 6
o ++x=  7
o ex.2 a = 1;
o b = 0;
o b = ++a;
o a = 2;
o b = 2 ;
o -------------
o b = a++;
o b = 1;
prototyping a function:
#include
using namespace std;
void protoTypedFunction(int,int);   the prototype
know what an infinite loop is:
o ex: while(true)
A while loop tell the output of it.
Part of dev environment combines our pro./prog. from - assembler linker, decoder, complier.
Know this something:
o cin >> x >> y;
o stdin: 5, 6;  x = 5 y = 6
interger division
19 / 7 =  2
length of a string.
o string name = "Billy" 
o length = 5

cout << pow(pow(num, num), number) << endl;
o pow = power operator from cmath/math.h.
o pow(9,3) = 9^3 =  9 * 9 * 9
Pre increment operation example. Break it down into 2 steps.
Ifstream <--- 160.="" a="" div="" file.="" opening="" page="">
Ascii has 128 characters
o Other one has 255 characters.
o Unicode has 65535 characters