Select the statement that is most correct. Which of the following applications may use a stack?
4 phương ánCó giải thích
Các phương án trả lời
Chọn một phương ánLời giảiChọn phương án để mở
Đáp án đúng: "Undo sequence in a text editor.". Ngăn xếp cho lấy ra đúng phần tử nạp vào sau cùng, và chuỗi hoàn tác cần đúng tính chất đó: thao tác vừa làm phải là thao tác được gỡ trước, nên mỗi lần chỉnh sửa người ta đẩy một bản ghi vào ngăn xếp rồi lấy ra theo chiều ngược. Việc "Store a waiting list of printing jobs." là danh sách chờ in, nó phải phục vụ theo lối ai tới trước in trước nên dùng hàng đợi. Việc "Store all variables in a program." cần đọc biến theo tên ở bất kỳ lúc nào, còn ngăn xếp chỉ cho thấy phần tử trên đỉnh, vì vậy bảng ký hiệu hay vùng nhớ cấp phát động mới là chỗ chứa. Việc "Multi-programming." là điều phối nhiều chương trình cùng chạy, bộ điều phối luân phiên theo lượt chờ nên cũng dựa vào hàng đợi chứ không dựa vào trật tự vào sau ra trước.
Cùng phần 2
Select the statement that is most correct.
Which of the following applications may not use a stack?Có lời giảiCâu hỏiConsider the following pseudocode:
declare a stack of characters
while(there are more characters in the word to read)
{read a character
if a character is '*' then
pop the stack
else
push the character into the stack
}
while(the stack is not empty)
pop and write the poped character to the screen
What is written to the screen for the input "Good**Morn**in***g" ?Có lời giảiCâu hỏiConsider the following pseudocode:
declare a stack of characters
while(there are more characters in the word to read)
{read a character
if a character is '*' then
pop and write the poped character to the screen
else
push the character into the stack
}
What is written to the screen for the input "Good**Morn**i***ng" ?Có lời giảiCâu hỏiCả 51 câu của chủ đề51 câu
Xuất hiện trong 1 bộ đề
Đi tiếp từ đây