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: "Evaluating arithmetic expressions.". Định giá biểu thức số học cần lấy ra đúng toán hạng hoặc toán tử nạp vào gần nhất, chẳng hạn khi gặp dấu đóng ngoặc thì phải xử lý phần vừa mở gần nhất trước, nên quy tắc vào sau ra trước của ngăn xếp khớp hoàn toàn; cài đặt ký pháp Ba Lan ngược cũng chỉ là đẩy toán hạng vào rồi lấy ra khi gặp toán tử. "Store all variables in a program." sai vì bảng biến cần tra theo tên bất kỳ lúc nào, trong khi ngăn xếp chỉ cho đọc phần tử trên đỉnh. "Store a waiting list of printing jobs." sai vì danh sách chờ in phải phục vụ bản in gửi trước, đó là hàng đợi; dùng ngăn xếp thì bản gửi sớm nhất có thể đợi vô hạn. "Multi-programming." sai vì hệ điều hành xếp tiến trình chờ theo thứ tự đến để cấp lượt, cũng là hàng đợi chứ không phải 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