CS计算机代考程序代写 CSCA48 Test #5

CSCA48 Test #5
• You will have 30 minutes to answer 2 questions
• Please ensure that your hands, head, and desktop are visible in your
webcam
• Turn your camera, microphone, and speakers on, leave your volume at a low level
• Once the test has begun, you may not touch or approach your computer unless told to do so, you must remain in view of the camera at all times
• If you have a question, raise your hand and you will be moved to a breakout room where you can talk to an invigilator
• All answers must be legible and clearly labeled, no marks will be given for unclear or unreadable answers
• If any question is under-specified, you will not be penalized for making a reasonable assumption

The questions on this test pertain to the following struct, write it down carefully
typedef struct Linked_List_Node{
char data;
struct Linked_List_Node *next;
}Node;

Question 1
Draw the memory model representing the following linked list • You do not need to show any function boxes
• You must show all locker addresses and data types
head
A
B
C

Question 2
Write a function called add_to_middle that adds a new node containing a given letter to the middle of a linked list
• You may choose your own parameters and return type
• You may assume you have access to any standard header file
• If the length of the list is odd, you may add either to the left or the right of the middle node