1234567
node *temp = list; while (temp != NULL) { cout << "[" << temp ->data << "] "; temp = temp ->next; } cout << endl; }