csc 201 Final Review

Posted in csc201 by bnmng on 2010 12/06

Remember the old stuff.
Nothing on linked lists. 14.1 and 14.2 only.
Remember arithmatic.
Remember if doing arithmetic with mixed types, the stronger type prevails.
If doing math with chars, you loose the char aspect. You hgave to cast it back in. ch=’A’;
Know the ignore command. cin.ignore(100,\n) ignores 100 chars or endl whichever first.
Difference between Extraction operator and .get. >> skips whitespaces (spaces, tabs, and newlines).
String Functions: Know the string library.
+ operator becomes the concatinate operator. Size indicates the size of the string. Substring operator.
subst always yields a string. at always yields a character.
using files: need to use fstream.
A program using files needs file handles, need to open files, in place of cin and cout, name of file stream.
Comparing strings: Lexicographical comparisons.
Lexicographical doesn’t work on cstrings. Wasn’t clear about that in chapter 3.
looping. Think about the parts of the loop. What they do, how they terminate.
Event control loops: Sentianl, EOF, and flag controled.
In sentinals and EOF, priming read.
while (data1) // Tests for EOF, tests for valid input and tests for file open.
Nesting of loops.
Basic procedures (which use void)
call by value //Can pass a constant, or an expression, or a variable, or a coercable variable
call by reference //Can only pass the right type of variable
Procedures yield values by a called by reference variable.
Value yielding functions: return values with the return statement.
Scope: If a name is the same in an inner scope and outer scope.
Scope applies to formal arguments.
Local variables are created when a function is called.
Static to retain value. Statics are created at the first call.
User defined tyypes.
Enumeration: Can’t read or write an enumeration type.
Remember when you have to cast to assign a value of an enumerator
Structs: Allows to block dissimilar types together.
Structs: Aggregate assignment; Call by value; call by reference
If we have an array of structs, remember the format for the name: ie mylist[3].member
Classes: abstract data types
Know the concept of data hiding
Class functrions: Constructor, observer, destructor, iterator, transforers
Observer functions are identifyable with the word const.
Selection Sort
Not responsible for binary search
Dangling Reference; Memory Leak; Innaccessible Object


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: