Question

In: Computer Science

QUESTION 1 Which of the following programming languages does NOT support parametric polymorphism? Java C++ Python...

QUESTION 1

  1. Which of the following programming languages does NOT support parametric polymorphism?

    Java

    C++

    Python

    C#

10 points   

QUESTION 2

  1. Which of the following programming languages does NOT support operator overloading?

    C#

    Python

    C

    C++

10 points   

QUESTION 3

  1. In a language that allows nested subprograms, the programming language has to choose a referencing environment for the executing the passed subprogram when a subprogram is passed as a parameter. Which of the following is NOT a choice?

    just in time binding

    shallow binding

    ad hoc binding

    deep binding

10 points   

QUESTION 4

  1. Which of the following is necessary for recursion to take place via subprogram calls?

    static local variables

    stack dynamic local variables

    type checking

    returning values from a function

10 points   

QUESTION 5

  1. Which of the following is NOT a concern when corresponding the actual parameters to the formal parameters?

    default parameters

    variable number of parameters

    return type

    positional parameters v. keyword parameter

10 points   

QUESTION 6

  1. Which of the following is NOT an inout mode of parameter passing?

    pass by reference

    pass by result

    pass by name

    pass by value-result

10 points   

QUESTION 7

  1. Which of the following is never used to distinguish between two subprograms in any programming language?

    return type

    subprogram name

    parameter names

    parameter profiles

10 points   

QUESTION 8

  1. Which of the following types of subprograms exhibit ad hoc polymorphism?

    OOP languages

    generic subprograms

    overloaded subprograms

    typeless languages

10 points   

QUESTION 9

  1. In which type of language is a closure never necessary?

    static scoped language that does NOT support nested subprograms

    dynamically scoped language that does NOT support nested subprograms

    static scoped language that does support nested subprograms

    dynamically scoped language that does support nested subprograms

10 points   

QUESTION 10

  1. In what way are coroutines the same as all other programs?

    only one coroutine is actually in execution at any given time

    multiple entry points

    have control statements which suspend execution of the subprogram

    maintain their status between executions

10 points   

Click Save and Submit to save and submit. Click Save All Answers to save all answers.

Solutions

Expert Solution

( 1 ) The following programming languages does NOT support parametric

JAVA

C#

( 2 )   The following programming languages does NOT support operator overloading

C

( 3 ) In a language that allows nested subprograms, the programming language has to choose a referencing environment for the executing the passed subprogram when a subprogram is passed as a parameter.

just in time binding

( 4 ) Stack dynamic local variables is necessary for recursion to take place via subprogram calls.

( 5 ) variable number of parameters is NOT a concern when corresponding the actual parameters to the formal parameters.

( 6 ) pass by result  is NOT an inout mode of parameter passing.

( 7 ) return type is never used to distinguish between two subprograms in any programming language.

( 8 ) overloaded subprograms exhibit ad hoc polymorphism.

( 9 ) static scoped language that does support nested subprograms.

( 10 ) multiple entry points .


Related Solutions

Java, Python, and C++ are three of the most useful programming languages to learn. Compare the...
Java, Python, and C++ are three of the most useful programming languages to learn. Compare the functionalities of all three programming languages. Why would you choose one language over another? Provide code examples demonstrating their usefulness in a real-world scenario.
1.In C++, C#, Java. Discuss string operations functions, with examples. Then make Comparison of programming languages  ...
1.In C++, C#, Java. Discuss string operations functions, with examples. Then make Comparison of programming languages   2.String and StringBuffer (C#, Java) with examples.
Do in c++ programming languages Question 1: Solve the complete Question with all parts and subparts....
Do in c++ programming languages Question 1: Solve the complete Question with all parts and subparts. a) What do you understand by the term DATA TYPE? b) Is it possible to replace for loop with a while loop. Justify your answer with reasoning and example. c) Draw a flow chart for Do-While loop for controlled/uncontrolled infinite loop iterations. d) Write down a function prototype that takes an array and its length as an argument and also return the same array...
1.) Many languages (e.g., C and Java) distinguish the character ’c’ from the string “c” with...
1.) Many languages (e.g., C and Java) distinguish the character ’c’ from the string “c” with separate sets of quotation marks. Others (e.g., Python) use “c” for both single characters and strings of length one. Provide (and justify) one advantage and one disadvantage of Python’s approach. 2.The designers of Java distinguish the primitive types (scalars) from the reference types (all other types of values) in the language. Discuss the costs and benefits to the programmer of this decision 3.In Ruby,...
Some languages support many modes of parameter passing. Provide 2 examples using two different programming languages...
Some languages support many modes of parameter passing. Provide 2 examples using two different programming languages which support the user of the programming language deciding which to use when creating their method. (Programming Languages)
Implement the MSI cache coherence protocol in your favorite programming language (C, C++, Java, python, etc.)....
Implement the MSI cache coherence protocol in your favorite programming language (C, C++, Java, python, etc.). Wikipedia has a nice high level description of the protocol. Consider only one level of cache which is a write back cache. Moreover, assume that there are 4 processing cores working on a single shared memory. To simplify, assume that you are writing the code for only one block of cache and that block can hold 4 different memory locations.
C++ Programming Create a C++ program program that exhibits polymorphism. This file will have three class...
C++ Programming Create a C++ program program that exhibits polymorphism. This file will have three class definitions, one base class and three derived classes. The derived classes will have an inheritance relationship (the “is a” relationship) with the base class. You will use base and derived classes. The base class will have at least one constructor, functions as necessary, and at least one data field. At least one function will be made virtual. Class members will be declared public and...
Design and construct a computer program in one of the approved languages (C, C++, C#, Java,...
Design and construct a computer program in one of the approved languages (C, C++, C#, Java, Pascal, Python, etc.) that will illustrate the use of a fourth-order explicit Runge-Kutta method of your own design. In other words, you will first have to solve the Runge-Kutta equations of condition for the coefficients of a fourth-order Runge-Kutta method. Then, you will use these coefficients in a computer program to solve the ordinary differential equation below. Be sure to follow the documentation and...
Design and construct a computer program in one of the approved languages (C, C++, C#, Java,...
Design and construct a computer program in one of the approved languages (C, C++, C#, Java, Pascal, Python, etc.) that will illustrate the use of a fourth-order explicit Runge-Kutta method of your own design. In other words, you will first have to solve the Runge-Kutta equations of condition for the coefficients of a fourth-order Runge-Kutta method. See the Mathematica notebook on solving the equations for 4th order RK method. .DO NOT USE a[1] or a[2] = 1/2. Then, you will...
QUESTION 4 To which C of the five C’s of credit does commercial loan support relate...
QUESTION 4 To which C of the five C’s of credit does commercial loan support relate most closely? Character Capacity Collateral Conditions
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT