• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/56

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

56 Cards in this Set

  • Front
  • Back
access labels
members in a class may be defined to be private, which protects them from access, from code that uses the type. members may also be defined as public, which makes them accessible code throughout the program.
address
number by which a byte in memory can be found.
arithmetic types
the arithmetic types represent numbers: integers and floating point. there are three types of floating poin values: long double, double, and float. there represent extended, double, and single precision values. it is almost always right to use double. in particular, float is guarenteed only six significant digits too small for most calculations.

the integral types include, bool, char, wchar_t, short, int, and long. integer types can be signed or unsigned. it is almost always right to avoid short and char for arithmetic. use unsigned for counting. the bool type may hold only two v alues: true or false. the wchar_t type is intended for characters from an extended character set; char type is used for characters that fit in 8 bits, such as Latin-1 or ASCII.
array
data structure that holds a collection of unnamed objects that can be accessed by an index.
byte
typically the smallest addressable unit of memory. on most machines a byte is 8 bits.
class
c++ mechanism for defining data types. classes are defined using either the class or struct keyword. classes may have data and function members. members may be public or private. ordinarily, function members that define the operations on the type are made public; data members and functions used in the implementation of the class are made private. by default, members in a class defined using the class keyword are private; members in a class defined using the struct keyword are public.
class member
a part of a class. members are either data or operations.
compound type
a type, such as a reference, that is defined in terms of another type.
const reference
a reference that may be bound to a const object, a non-const object, or to an rvalue. a const reference may not change the object to which it refers.
constant expression
an integral expression whose value can be evaluated at compile-time.
constructor
special member function that is used to initialize newly created objects. the job of a constructor is to ensure that the data members of an object have safe, sensible initial values.
copy-initialization
form of initialization that uses the = symbol to indicate that variable should be initialized as a copy of the initializer.
data member
the data elements that constitute an object. data members ordinarily should be private.
declaration
asserts the existence of a variable, function, or type defined elsewhere in the program. some declarations are also definitions; only definitions allocate storage for variables. a variable may be declared by preceeding its type with e keyword extern. names may not be used until they are defined or declared.
default constructor
the constructor that is used when no explicit values are given for an initializer of a class type object. for example, the default constructor for string intializes the new string as the empty string. other string constructors intialize the string with the characters specified when the string is created.
definition
allocates storage for a variable of a specified type and optionally initializes the variable. names may not be used until they are defined or declared.
direct-initialization
form of initialization that places a comma-separated list of initializers inside a pair of parentheses.
enumeration
a type that groups a set of named integral constants.
enumerator
the named members of an enumeration. each enumerator is initialized to an integral value and the value of the enumerator is const. enumerators may be used where integral constant expressions are required, such as the dimension of an array definition.
escape sequence
alternative mechanism for representing characters. usually used to represent nonprintable characters such as newline or tab. an escape sequence is a backslash followed by a character, a three-digit octal number, or a hexadecimal number. escape sequences can be used as literal character (enclosed in single quotes) or as part of a literal string (enclosed in double quotes).
global scope
scope that is outside all other scopes.
header
a mechanism for making class definitions and other declarations available in multiple source files. user-defined headers are stored as files. system headers may be stored as files or in some other system-specific format.
header guard
the preprocessor variable defined to prevent a header from being included more than once in a single source file.
identifier
a name. each identifier is a nonempty sequence of letters, digits, and underscores that must not begin with a digit. identifiers are case-sensitive: upper- and lowercase letters are distinct. identifiers may not use c++ keywords. identifiers may not contain two adjacent underscores nor may they begin with an underscore followed by an uppercase letter.
implementation
the (usually private) members of a class that define the data and any operations that are not intended for use by code that uses the type. the istream and ostream classes, for example, manage an IO buffer that is part of their implementation and not directly accessible to users of those classes.
initialized
a variable that has an intial value. an initial value may be specified when defining a variable. variables usually should be initialized.
integral types
see arithmetic type
interface
the operations supported by a type. well-designed classes seperate their interface and implementation, defining the interface in the public part of the class and the implementation in the private parts. data members ordinarily are part of the implementation. function members are part of the interface (and hence public) when they are operations that users of the type are expected to use and part of the implementation when they perform operations needed by the class but not defined for general use.
link
compilation step in which multiple object files are put together to form an executable program. the link step resolves interfile dependencies, such as linking a function call in one file to a function definition contained in a second file.
literal constant
a value such as a number, a character, or a string of characters. the value cannot be changed. literal characters are enclosed in single quotes, literal strings in double quotes.
local scope
term used to describe function scope and the scopes nested inside a function.
lvalue
a value that may appear on the left-hand of an assignment. a non-const lvalue may be read or written.
magic number
a literal number in a program whose meaning is important but not obvious. it appears as if by magic.
nonconst reference
a reference that may be bound only a nonconst lvalue of the same type as the reference. a nonconst reference may change the value of the underlying object to which it refers.
nonprintable character
a character with no visible representation, such as a control character, a backspace, a newline, and so on.
object
a region of memory that has a type. a variable is an object that has a name.
preprocessor
the preprocessor is a program that runs as part of the compilation of a c++ program. the preprocessor is inherited from C, and it uses are largely obviated by features in c++. one essential use of the preprocessor remains: the #include facility, which is used to incorporate headers into a program.
private member
member that is inaccessible to code that uses the class.
public member
member of a class that can be used by any part of the program.
reference
an alias for another object. defined as follows: type &id = object; defines to be another name for object. any operation on id is translated as an operation on object.
run time
refers to the time during which the program is executing.
rvalue
a value that can be used as the right-hand, but not left-hand side of an assignment. an rvalue may be read but not written.
scope
portion of a program in which names have meaning. c++ has several levels of scope:

global - names defined outside any other scope.

class - names defined by a class.

namespace - names defined within a namespace.

local - names defined within a function.

block - defined within a block of statements, that is, within a pair of curly braces.

statement - names defined within the condition of a statemen, such as an if, for, or while.

scopes nest. for example, names declared at global scope are accessible in function and statements scope.
separate compilation
ability to split a program into multiple separate source files.
signed
integer type that holds negative or positive values, including zero.
statically typed
term used to refer to languages such as c++ that do compile-time type checking. c++ verifies at compile-time that the types used in expressions are capable of performing the operations required by the expression.
struct
keyword that can be used to define a class. by default, members of a struct are public until specified otherwise.
type-checking
term used to describe the process by which the compiler verifies that the way objects of a given type are used is consistent with the definition of that type.
type specifier
the part of a definition or declaration that specifies the type of the variables that follow.
typedef
introduces a synonym for some other type. form: typedef type synonym; defines synonym as another name for the type named type.
undefined behavior
a usage for which the language does not specify a meaning. the compiler is free to do whatever it wants. knowingly or unknowingly relying on undefined behavior is a great source of hard-to-track run-time errors and portability problems.
unitialized
variable with no specified initial value. an unitialized variable is not zero or "empty" instead, it holds whatever bits happen to be in the memory in which it was allocated. unitialized variables are a great source of bugs.
unsigned
integer types that holds values greater than or equal to zero.
variable initialization
term used to describe the rules for initializing variables and array elements when no explicit initializer is given. for class types, objects are initialized by running the class's default constructor. if there is no default constructor, then there is a compile-time error: The object must be given an explicit initializer. for built-in types, initialization depends on scope. objects at global scope are initialized to 0; those defined at local scope are uninitialized and have undefined values.
void type
special-purpose type that has no operations and no value. it is not possible to define a variable of type void. most commonly used as the return type of a function that does not return a result.
word
the natural unit of integer computation on a given machine. usually a word is large enough to hold an address. typically on a 32-bit machine a word is 4 bytes.