What special character is used in C to denote the memory address of a
variable? - correct answer ✔&
Which of the following best defines a pointer in C? - correct answer ✔a
variable whose value is the address of another variable
What special character is used when declaring a variable that is a pointer? -
correct answer ✔*
The data type of a pointer does not need to match the data type of the
variable it points to. - correct answer ✔False
initializePlayer(&playerOne, PLAYERONE); - correct answer ✔Passing a
pointer to a function
Given the source code above, referencing the ? at line 11, which of the
following is the correct punctuation or notation to access member gameBoard
in parameter player?
player?gameBoard; - correct answer ✔->
What notation is used to dereference a pointer? - correct answer ✔->
strcat(s1, s2) - correct answer ✔Concatenates
strchr(s1, ch) - correct answer ✔Returns a pointer to the first occurrence
of character ch in string s1.
, strstr(s1, s2): - correct answer ✔Returns a pointer to the first occurrence
of string s2 in string s1.
strtok(s1, delim) - correct answer ✔Split a string into tokens
What C programming keyword is used to define a structure? - correct answer
✔struct
typedef struct location{
int row;int column;
} Location;
Given the source code above, what are the variables row and column called in
a struct? - correct answer ✔members
7 loc?row = 5;
8 loc?column = 5;
Given the source code above, referencing the ?'s on line 7 and 8, what is the
correct notation to access row and column of struct Location variable loc? -
correct answer ✔.
typedef struct gameboard{
char board[ROWS][COLS];
} GameBoard;
GameBoard gameBoard;
Given the source code above, which of the following code examples is the
correct methodology to pass struct GameBoard variable gameBoard to a
function as a struct? - correct answer ✔initializeGameBoard(&gameBoard);