问题
单项选择题
一些重要的程序语言(如C语言和Pascal语言)允许过程的递归调用。而实现递归调用中的存储分配通常用( )。
A.栈
B.堆
C.数组
D.链表
答案
参考答案:A
解析: 一些较流行的程序语言允许过程的递归调用。递归调用就是过程调用本身。递归实现的是:当过程每一次执行后,都能返回到最近一次调用它的过程中。这样各调用点之间形成一种后进先出关系,而栈结构正适合来存储这些调用点。
一些重要的程序语言(如C语言和Pascal语言)允许过程的递归调用。而实现递归调用中的存储分配通常用( )。
A.栈
B.堆
C.数组
D.链表
参考答案:A
解析: 一些较流行的程序语言允许过程的递归调用。递归调用就是过程调用本身。递归实现的是:当过程每一次执行后,都能返回到最近一次调用它的过程中。这样各调用点之间形成一种后进先出关系,而栈结构正适合来存储这些调用点。
![]() Are you 1 for a place in the southwest of China? If your answer is “yes”, why not pay a trip to Shangri-la, which is 2 mysteries and beauty. The world “Shangri-la” first appeared in the 1993 novel Lost Horizon 3 the British writer James Hilton. He described a beautiful kingdom where three rivers 4 together and snow-capped mountains reached to the sky, with fields of long grass covering the earth. In this perfect world lived people who had discovered how to stay 5 forever. Three mountains are covered with snow and tower 6 the land. These snowy mountain tops form 7 beautiful picture that we can’t wait to fly there. Lakes, 8 by vast grasslands, look like diamonds. Sheep, cows, horses and animals feed 9 on the green grass and the forests around are 10 to lots of birds and animals. In this heavenly world, people live in perfect harmony with nature.
|