Which of the following statements are correct for recursion?

a. Recursion is available only in the C and C++ languages.
b. Recursion is available in all programming languages.
c. Recursion is available in most modern programming languages, including C++.
d. Recursion is a preprocessor technique
e. Recursion, if used with care can be a useful programming technique.


c) and e)
Explanation: Part a) is in error, one has only to note almost any programming language designed since FORTRAN, though the student will only know the statement in a) from the text. Part b) is false, since there are some languages that do not support recursion. The text asserts “most modern languages … all functions [to be] recursive.”. This is part c). Part d) The preprocessor may provide recursion, but this writer has never seen it used. e) This statement is a direct quote from the text. Experience with C++ and other programming languages bears this out.

Computer Science & Information Technology

You might also like to view...

Is there an error?

``` class B { public: void virtual f(); }; void B::f() {/*. . . */} ```

Computer Science & Information Technology

Which file system was originally developed for computers running DOS and is currently supported by Windows 10 and Linux?

A. FAT B. FAT32 C. NTFS D. FATNT

Computer Science & Information Technology

Sound files are most often used in Alice worlds to add instructions.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What is the FTC implementation of the GBLA?

A. Interagency guidelines B. Guidelines for Safeguarding Member Information C. Safeguards Act D. Banks Holding Company Act

Computer Science & Information Technology