一起答
单选

设有一个递归算法如下    im fact(int n){        if(n<=0)return 1;        else return n * fact(n-1);    }    下面正确的叙述是(35)。

  • A.计算fact(n)需要执行n次函数调用
  • B.计算fact(n)需要执行n+1次函数调用
  • C.计算fact(n)需要执行n+2次函数调用
  • D.计算fact(n)需要执行n-1次函数调用
参考答案
查看试卷详情
相关试题
  1. (80)

    • A.evidence
    • B.evidenced
    • C.evidences
    • D.evidencing
  2. (79)

    • A.more
    • B.little
    • C.a matter
    • D.important
  3. (78)

    • A.logic
    • B.function
    • C.flexible
    • D.application
  4. Structured programming practices(71)rise to Pascal, in which constructs were introduced to make programs more readable and better(72)C provided a combination of assembly and high -level  structure to create a general -purpose language that could be used from system to(73)programming.  Next came object orientation, which is(74)of a metrology and design philosophy than a language  issue. This is(75)by the addition of so - called OO extensions to current language, such as C++.

    • A.giving
    • B.given
    • C.gave
    • D.gives
  5. (77)

    • A.structure
    • B.structured
    • C.constructs
    • D.structures
  6. (74)

    • A.graphics
    • B.graph
    • C.graphitic
    • D.graphical
  7. (75)

    • A.visually
    • B.lively
    • C.quickly
    • D.specially
  8. (73)

    • A.choose
    • B.selections
    • C.choice
    • D.select
  9. (72)

    • A.interfaces
    • B.pictures
    • C.graphs
    • D.books
  10. Application development increasingly means Windows development, and the popularity of visual development tools has(66)in tandem with Windows itself. These tools create beautiful windows wing(67)and their fast development cycles and easy learning curves make them a good(68)for many types of PC development projects. Today's developers are leveraging these tools and the abundance of cheap, powerful PCs to shift the balance of power to the desktop. As the world moves inexorable toward Window and other(69). user interfaces, developers can choose from an abundance of(70)oriented tools. Popular examples include Microsoft Corp's Visual Basic, powersoft Corp's PowerBuilder, Gupta Technology Corp's SQL Windows, and so on.

    • A.rise
    • B.risen
    • C.rised
    • D.rising