CSE 240 COMPREHENSIVE EXAM SCRIPT
VERIFIED QUESTIONS COMPLETE
ANSWERS GRADED APLUS
◉ What parameters are required when performing file operations
fread and fwrite?
Answer: -destination
-source
-item size
-number of items
◉ Given the information below, how will you access the name of
the third terminal node in the linked-list? Assume head is pointing
to the first terminal node and there are at least 3 terminals in the
linked-list.
struct Terminal {
char name[30];
char location[32];
struct Terminal* next;
} *head;
Answer: head->next->next->name;
◉ Assume this is a 32-bit environment, what is the size of x?
, struct Terminal {
char name[30];
char location[32];
struct Terminal* next;
} *x;
Answer: 4 bytes
◉ Assume this is a 32-bit environment, what is the size of x?
(HINT: Don't forget about padding.)
struct Terminal {
char name[30];
char location[32];
struct Terminal* next;
} x;
Answer: 68 bytes
◉ Given the information below, how will you access the name for
a terminal node pointed to by x?
struct Terminal {
char name[30];
char location[32];
VERIFIED QUESTIONS COMPLETE
ANSWERS GRADED APLUS
◉ What parameters are required when performing file operations
fread and fwrite?
Answer: -destination
-source
-item size
-number of items
◉ Given the information below, how will you access the name of
the third terminal node in the linked-list? Assume head is pointing
to the first terminal node and there are at least 3 terminals in the
linked-list.
struct Terminal {
char name[30];
char location[32];
struct Terminal* next;
} *head;
Answer: head->next->next->name;
◉ Assume this is a 32-bit environment, what is the size of x?
, struct Terminal {
char name[30];
char location[32];
struct Terminal* next;
} *x;
Answer: 4 bytes
◉ Assume this is a 32-bit environment, what is the size of x?
(HINT: Don't forget about padding.)
struct Terminal {
char name[30];
char location[32];
struct Terminal* next;
} x;
Answer: 68 bytes
◉ Given the information below, how will you access the name for
a terminal node pointed to by x?
struct Terminal {
char name[30];
char location[32];