第 1 题 · 单选题(2 分)
对如下定义的循环单链表,横线处填写( )。
struct Node {
int data;
Node* next;
Node(int d): data(d), next(nullptr) {}
};
Node* createList(int value) {
Node* head = new Node(value);
head->next = head;
return head;
}
void printList(Node* head) {
if (head == nullptr) return;
Node* p = head;
/* 填空 */
cout << endl;
}