| |
Computer memory locations (addresses) are numbered sequentially starting at | 0 |
The body of the function | is surrounded by braces |
In C++ program , the variable my_global_variable is initialized | with all bits set to zero |
T or F, Multiple computer memory locations can be accessed via the same memory address. | false |
T or F, Computer memory is similar to a row of container boxes with unique address assigned to each box | true |
How much access time vary between different RAM memory locations? | It takes the same time to access any address |
In C, C++, and Java, int is a | data type |
&x means | take the address of &x |
Using calculator, convert decimal value 123 to hex: | 7B |
You don't need to have a return statement in your function | when you declare that your function has void return type |
Empty parentheses in main( ) indicate that | the function has no input parameters |
A C++ program
#include <iostream>
int main()
{
int x = 123;
std::cout << &x << '\n';
return 0;
}
prints | the memory address of the variable x |
Does function main( ) have a return value in a C/C++ program? | yes |
The & operator | finds the address of a variable |
T or F, The higher the memory address in RAM the longer it takes for the CPU to access that memory. | false |
How big is one byte? | 8 bits |
Which of the following is an example of an error related to computer memory misuse? | all of the above |
Local variables live | in the stack |
T or F, A memory address uniquely identifies a piece of memory available to the CPU. | true |
T or F, By definition, global variables are accessible both inside and outside of C functions. | true |
Required amount of memory storage for global variables | is allocated at compile time |
Accessing memory at the NULL (nullptr in C++) location | will cause a segmentation fault crash |
What return value is expected from main( ) at the normal ending of a C/C++ program? | 0 |
A memory address is a | unique number identifying a piece of memory |
By definition, global variable is the one declared | outside of any function (at the file level) |
Using calculator, convert hex value 5F to binary: | 01011111 |