I was trying to translate this code into plane English so I can figure out the output but I'm getting mixed up. The more I think about it, the more confused I get! I was able to Identify some of it, but it still confuses me... Please help..
list = new nodeType; //create a new node list->info = 10; //assign 10 to the first node ptr = new nodeType; //create a pointer ptr->info = 13; //assign 13 to the first node ptr->link = NULL; // the end of the pointer in null list->link = ptr; // ptr = new nodeType; //create a pointer ptr->info = 18; //assign 18 to the first node ptr->link = list->link; list->link = ptr; cout << list->info << " " << ptr->info << " "; ptr = ptr->link; cout << ptr->info << endl;

New Topic/Question
Reply
MultiQuote








|