Conestoga College - PROG 71985
copyList() Breakdown
Assignment 4In this chapter, we’ll walk through how to complete the copyList function.
//Exam Question 3: Copy a list!
struct listElement *copyList(struct listElement *sourceList) {
struct listElement *targetList = NULL;
//You should create a brand new Linked List in this function
//Copy from the source linked list element-by-element
//and then return the head address of the copied list (*targetList) back
// YOUR IMPLEMENTATION HERE
return targetList;
}Members only
Keep reading this lesson
You've reached the end of the free preview. Unlock the rest of this lesson plus 3 more lessons in Conestoga College - PROG 71985.
- Unlimited coding questions
- Unlimited access to all classroom material
- Weekly live call for questions and guidance
- 3,000 AI tutor tokens / month
- Personal SQL database (3 MB)
- Progress tracking
Cancel any time.