Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.

The most important types are int, char, bool, and double; also classes. "Quiz 1"

Quiz yourself by thinking what should be in each of the black spaces below before clicking on it to display the answer.
        Help!  

Question
Answer
int x;   Fastest integer type (16-32 bits), also short, long, and unsigned  
🗑
char x;   8-bit character, '\0' to '\xFF' or -128 to 127  
🗑
double x;   64 bit real + or - 1.8e308, 14 significant digits, also float  
🗑
bool x;   true or false  
🗑
const T x;   Non-modifiable object  
🗑
T f(...) {...}   Defines f as a function returning T  
🗑
T* p;   Pointer to T (*p is a T object)  
🗑
T a[N];   Array of N elements of T, a[0] to a[N-1]  
🗑
static T x;   Place x in data segment  
🗑
register T x;   (rare) Hint to optimize for speed  
🗑
volatile T x;   (rare) x may be modified externally  
🗑
t& y=x;   Reference, y is an alias for x, which both have type T  
🗑
How do you include a standard library type and the beginning of the program?   #include <header>  
🗑
What standard type must be included at the beginning of the program?   using namespace std;  
🗑
istream / iostream   Standard input (cin)  
🗑
ostream / iostream   Output (cout, cerr, clog)  
🗑
ifstream / fstream   Input file  
🗑
ofstream / fstream   Output file  
🗑
string / string   Sequence of char  
🗑
vector<T> / vector   Expandable array/stack of T  
🗑
deque<T> / deque   Array/double ended queue  
🗑
list<T> / list   List/stack/queue of T  
🗑
map<T1,T2> / map   Associative mapping of T1 to T2  
🗑
set<T1> / set   A map with keys only  
🗑
pair<T1,T2> / map or utility   Two objects of type T1 and T2  
🗑
priority_queue<T> / queue   Sorted queue  
🗑
stack<T> / stack   Stack  
🗑
bitset<N> / bitset   Array of N bool with logical operations  
🗑
valarray<T> / valarray   Array with arithmetic operations  
🗑
complex<T> / complex   Complex number  
🗑
iterator / (Included with container)   Pointer into a container  
🗑
const_iterator / (Included with container)   Pointer not allowing element assignment  
🗑
exception / stdexcept, exception   Hierarchy of exception types  
🗑
algorithm   min(), max(), swap(), sort(), copy(), equal()  
🗑
numeric   accumulate(), inner_product()  
🗑
iterator   back_inserter()  
🗑
functional   equal_to(), less(), bind2nd()  
🗑
new   set_new_handler()  
🗑
cstdlib   atoi(), atof(), abs(), rand(), system(), exit()  
🗑
cctype   isalpha(), isgigit(), tolower(), toupper()  
🗑
cmath   sqrt(), log(), exp(), pow(), sin(), cos(), atan()  
🗑
ctime   clock(), time()  
🗑
cstring   strleng(), memset(), memmove(), memcmp()  
🗑
cstdio   printf(), fopen(), getc(), perrer()  
🗑
cassert (debugging)   assert()  
🗑
What most important type does C++ allow you to create on your own? Define it.   A class is a abstract data structure and an associated set of member functions (methods) and related type declarations which can be associated with the class or instances (objects) of the class. A class is divided into public and private implementations.  
🗑
Define inheritance in one sentence:   Inheritance is a hierarchy of classes, and it is used to write a specialized or enhanced version of another class; For example, an ofstream is a type of ostream.  
🗑
Define polymorphism in one sentence:   Polymorphism is the technique of coding a common interface for a hierarchy of classes; For example, A child object is allowed wherever a parent object is expected.  
🗑
class T {...};   Defines T as a collection of types, objects, and member functions  
🗑
template <class T> ...   Defines a set of functions or classes over all T  
🗑
typedf T U;   Defines type U is a synonym for T  
🗑
enum T {...};   Defines T as an int, and set of int constants  
🗑
struct T {...};   Like a class, except default scope of members is public  
🗑
union T {...};   A struct with object members overlapping in memory  
🗑
namespace N {...};   Defines a scope for a collection of types, objects, and functions  
🗑


   

Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
 
To hide a column, click on the column name.
 
To hide the entire table, click on the "Hide All" button.
 
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
 
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.

 
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how
Created by: themagicdwarf
Popular Computers sets