static void just_traverse(sll **head_ref) {
sll *first = *head_ref;
sll *second = (*head_ref)->next;
if(second == NULL) {
return;
}
just_traverse(&(second));
*head_ref = second;
printf("%d \t",second->payload);
}
在上面的代码中,如果我删除 *head_ref = second; 我得到关于堆栈的输出但是如果我把这条线 *head_ref = second; 它总是打印最后一个元素说 {4,3,2,1} 然后它总是打印 1?谁能解释为什么?