ELEC 376 Final 2018 Flashcards
(121 cards)
C++ is the first programming language to create .o or object files as part of its compilation process
F
Global variables cannot be declared in a C++ program
F
A C++ style variable declaration uses assignment = instead of ()
F
Unlike Java, there are many different C++ compilers in use
T
The GCC compiler that we have been using throws an exception if an attempt is made to divide a double by zero
F
In C++ you can assign your own choice of integer values to members of an enum
T
The final keyword is used to declare a constant
F
The keyword “auto” can be used to type a variable during declaration even if it is not assigned a value in the declaration
F
If a numeric literal has the suffix “i” at the end of the number it will be identified as the type std::complex<double></double>
T
A C-Style cast will preserve the const property of a variable
F
A reference can be null
F
static_cast is a templated operator
T
The “address of” operator, &, is used on the LHS of an assignment statement
F
Indirection is the process of obtaining a value by dereferencing a pointer
T
You cannot create a reference to an int type variable
F
The statement int* x, y, z; creates three pointers to an int
F
Memory address locations cannot be obtained in C++
F
A pointer does not occupy any memory
F
The * operator is used to dereference a pointer, when it is on the RHS of an assignment operator
T
A 2D array of int could be typed as **int
T
A “pointer to a constant” is the same thing as a “constant pointer”
F
When used with a pointer, the -> operator provides dereferencing and membership
T
A parameter can be declared to be a constant reference to a constant pointer by using the const keyword twice
T
In C++11 or later, a struct can be assigned using an initializer list in {}
T