Help shape GoConqr. What should we add next?

Quiz

CS 4337 EXAM 3

Tracey Powell 111 questions

Take the quiz

This quiz has question types that open in the usual player.

Questions in this quiz (111)

  1. 1[Cadelli&Wegner1985] According to the authors, _____ polymorphism is so called because the uniformity of type structure is normally achieved by type parameters, but uniformity can be achieved in different ways, and this more general concept is called universal polymorphism.
    1. Amonomorphic
    2. Bpolymorphic
    3. Cuniform
    4. Dad-hoc
    5. Eparametric
    6. Foverloading
    7. Ginclusion
    8. Hcoercion
  2. 2[Cadelli&Wegner1985] According to the authors. Select the best choice for matching.

    Overloading : [blank_start]D[blank_end]
    Coercion: [blank_start]A[blank_end]
    Subtyping: [blank_start]B[blank_end]
    Value Sharing: [blank_start]C[blank_end]

    All Answer Choices
    A. an integer value can be used where a real is expected, and vice versa.
    B. elements of a subrange type also belong to superrange types.
    C. null pointer in C/C++ is a constant which is shared by all the pointer types.
    D. integer constants may have both type integer and real. Operators such as + are applicable to both integer and real arguments.
    1. AD
    2. BA
    3. CB
    4. DC
  3. 3[Cadelli&Wegner1985] According to the authors, ____ types are types whose operations are applicable to values of more than one type.
    1. Amonomorphic
    2. Bpolymorphic
    3. Cuniversal
    4. Dad-hoc
    5. Eparametric inclusion
    6. Foverloading coercion
    7. Ginclusion
    8. Hcoercion
  4. 4[Cadelli&Wegner1985] According to the authors, conventional typed languages, such as Pascal, are based on the idea that functions and procedures, and hence their operands, have a unique type. Such languages are said to be ____, in the sense that every value and variable can be interpreted to be of one and only one type.
    1. Amonomorphic
    2. Bpolymorphic
    3. Cuniversal
    4. Dad-hoc
    5. Eparametric
    6. Foverloading
    7. Ginclusion
    8. Hcoercion
  5. 5[Cadelli&Wegner1985] According to the authors: Consider the following example.

    3+4
    3+4.0
    3.0+4
    3.0+4.0


    Here, the ad-hoc polymorphism of + can be explained in one of the following ways.
    Which one of the following is NOT correct?
    1. AThe operator + has four overloaded meanings, one for each of the four combinations of argument types.
    2. BThe operator + has two overloaded meanings, corresponding to integer and real addition.
    3. CWhen one of the argument is of type integer and the other is of type real, then the integer argument is coerced to the type real.
    4. DThe operator + is defined only for real addition, and integer arguments are always coerced to corresponding reals.
    5. EThe operator + has three overloaded meanings: one for integers, one for reals, and one for mixed argument types.
  6. 6[Cadelli&Wegner1985] According to the authors: In _____ polymorphism, a polymorphic function has an implicit or explicit type parameter, which determines the type of the argument for each application of that function.

    1. Amonomorphic
    2. Bpolymorphic
    3. Cuniform
    4. Dad-hoc
    5. Eparametric
    6. Foverloading
    7. Ginclusion
    8. Hcoercion
  7. 7[Cadelli&Wegner1985]
    According to the authors, ____ allows type inconsistencies to be discovered at compile time and guarantees that executed programs are type-consistent.
    1. ADynamically typed
    2. BInteractively typed
    3. CStatically typed
    4. DWeakly typed
    5. EUntyped
  8. 8[Cadelli&Wegner1985] According to the authors. Value sharing is a special case of _____ polymorphism. The fact that an object having many types is uniformly represented for all types is characteristic of _____ polymorphism.
    1. Amonomorphic
    2. Bpolymorphic
    3. Cuniversal
    4. Dad-hoc
    5. Eparametric
    6. Foverloading
    7. Ginclusion
    8. Hcoercion
  9. 9[Cadelli&Wegner1985] According to the authors, parametric and inclusion polymorphism are classified as the two major subcategories of ____ polymorphism, which is contrasted with nonuniversal polymorphism.
    1. Amonomorphic
    2. Bpolymorphic
    3. Cuniversal
    4. Dad-hoc
    5. Eparametric
    6. Foverloading
    7. Ginclusion
    8. Hcoercion
  10. 10[Cadelli&Wegner1985] According to the authors: There are also two major kinds of ad-hoc polymorphism. In ____ the same variable name is used to denote different functions, and the context is used to decide which function is denoted by a particular instance of the name.

    1. Amonomorphic
    2. Bpolymorphic
    3. Cuniform
    4. Dgeneric
    5. Eparametric
    6. Foverloading
    7. Ginclusion
    8. Hcoercion

Information

Description
Computer Science Quiz on CS 4337 EXAM 3, created by Tracey Powell on 28/11/2016.
Language
English
Views
1
Tags
computer science
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What should we add next?