diff --git a/codes/c/chapter_stack_and_queue/array_stack.c b/codes/c/chapter_stack_and_queue/array_stack.c index 807c9bca4..39e1cff4d 100644 --- a/codes/c/chapter_stack_and_queue/array_stack.c +++ b/codes/c/chapter_stack_and_queue/array_stack.c @@ -90,11 +90,11 @@ int main() { /* 获取栈的长度 */ int size = stack->size; - printf("栈的长度 size = %d\n", size); + printf("栈的长度 size = %d\n", size); /* 判断是否为空 */ bool empty = isEmpty(stack); - printf("栈是否为空 = %stack\n", empty ? "true" : "false"); + printf("栈是否为空 = %s\n", empty ? "true" : "false"); // 释放内存 delArrayStack(stack); diff --git a/en/docs/chapter_array_and_linkedlist/summary.md b/en/docs/chapter_array_and_linkedlist/summary.md index 299d5af0e..73b021c7a 100644 --- a/en/docs/chapter_array_and_linkedlist/summary.md +++ b/en/docs/chapter_array_and_linkedlist/summary.md @@ -74,7 +74,7 @@ On the other hand, linked lists are primarily necessary for binary trees and gra **Q**: Does initializing a list `res = [0] * self.size()` result in each element of `res` referencing the same address? -No. However, this issue arises with two-dimensional arrays, for example, initializing a two-dimensional list `res = [[0] * self.size()]` would reference the same list `[0]` multiple times. +No. However, this issue arises with two-dimensional arrays, for example, initializing a two-dimensional list `res = [[0]] * self.size()` would reference the same list `[0]` multiple times. **Q**: In deleting a node, is it necessary to break the reference to its successor node?