Starting from:

$29.99

CS101A Assignment 11 Solution

1. (Multiple choices) Which of the following statement is/are NOT true? ( 2 points ) A. Every program that is executed on a computer must be in the form of the computer’s machine language.
B. Assembler reads each of the instructions in mnemonic form and translates it into the machine-language equivalent.
C. Assembly language is a low-level programing language in which a mnemonic represents each of the machine-language instructions for general computer.
D. The java bytecode can be compiled or interpreted by any computer that runs a Java compiler.
E. APL, C, C#, Pascal, Java, Ada are the third-generation languages.

2. (Multiple choices) Which of the following statement is/are false? ( 2 points ) A. The imperative paradigm defines the programming process to be the development of a sequence of commands that, when followed, manipulate data to produce result. B. Functional programming is one category of the declarative paradigm.
C. Methods describe how the object, encompassing a collection of procedures, respond to the occurrence of various events.
D. High-level programming languages allow locations in cache to be referenced by descriptive names rather than by numeric addresses.

3. (Multiple choices) Which of the following statement is/are false? ( 2 points ) A. Assembler and complier will produce an equivalent program in the appropriate machine language as output.
B. Interpreter inputs a program in a high-level language and directs the computer to perform the actions specified in each statement.
C. For the first approach to interpretation, if any errors occur, the process will display an error message and continue the rest of the process.
D. For the second approach, the transition will be done in two steps, compilation and interpretation, to achieve portability.

4. (Multiple choices) Which of the following statement is/are false? ( 2 points ) A. The program in its original form is called the source program, and the translated version is called the object program.
B. The transition process consists of three activities: syntax analysis, parsing, and code generation.
C. The semantic analyzer checks the tokens created by the syntax analyzer to be sure that they contain no ambiguity.
D. LISP(LISt Programming) is a functional programming language in which everything is considered as a list.

5. Please briefly describe the difference between value passing and reference passing through a swap function example (considering definition parameters, function parameters, function returns, value changes in input parameters, etc).(2 points)

More products