questions(solved & verified for
accuracy)
an adress - answer A pointer is a variable that stores what type of
information?
char - answer char *c = (char*)malloc(sizeof(char)*16);
What is the type of *c?
char** - answer char *c = (char*)malloc(sizeof(char) *16);
What is the type of &c?
when variables allocated in a function and stored in the heap are
lost when the function returns - answer Which of the following
describes a memory leak?
linking - answer Which stage of compilation produces executable
object files as output?
preprocessing - answer Which stage of compilation handles
statements like #include <stdio.h>?
Correct!
relocatable object - answer What is the output of an assembler?
float** - answer Given the declaration float **matrix, what is the
type of &matrix[0]?
, 13 - answer How many bytes of memory are needed to store the
string "CS261 rocks!" in C?
stack - answer Parameters passed to a function are stored in what
part of memory?
The value stored at the address that is stored at address 4567 -
answer Assume that a pointer, ptr, has the value 4567. What would
you get by accessing *ptr[0]?
e - answer What is the output of the following code? Assume that
the address of the variable s is 10 and the address of the variable t
is 11.
char s = 'c';char *t = &s;*t = *t + 1;printf ("%c", *t + 1);
36 - answer What is the minimum amount of memory required to
store a novel_t variable? Specify your answer as an exact numerical
byte count.
10 - answer How many bytes of memory are needed to store the
following string (notice the one space after the comma):
"Hey, Jude"
stack - answer Variables that are local to a function are stored in
what part of memory?
address of x - answer Printing &x will produce what output?
double* - answer Consider the following line of code (assume it is
in main()):
double *d = (double*) malloc( sizeof(double) );