Solved

The Following Function Cycles Through a Linked List and Displays

Question 38

Multiple Choice

The following function cycles through a linked list and displays its contents. Line 3 can be replaced with ____.
1 void display(struct myStruct *contents)
2 {
3 while (contents != NULL)
4 {
5 printf("%-30s\n",contents->name, contents->phoneNum) ;
6 contents = contents->nextaddr;
7 }
8 }


A) while (isValid(contents) )
B) while (contents != EOF)
C) while (!contents)
D) while (contents != NIL)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents