Podcast
Questions and Answers
Arrays in imperative and object-oriented programming languages can be understood as mappings from type S to type T?
Arrays in imperative and object-oriented programming languages can be understood as mappings from type S to type T?
True (A)
The cardinality of S → T is always equal to #(S) multiplied by #(T)?
The cardinality of S → T is always equal to #(S) multiplied by #(T)?
False (B)
A mapping m : S → T means that every value in set S is mapped to every value in set T?
A mapping m : S → T means that every value in set S is mapped to every value in set T?
False (B)
If m1 = {u → a, v → c} and m2 = {u → c, v → c}, then the image of v under m1 is c?
If m1 = {u → a, v → c} and m2 = {u → c, v → c}, then the image of v under m1 is c?
In Ada, the index range for arrays may include Float as a primitive (sub)type.
In Ada, the index range for arrays may include Float as a primitive (sub)type.
The type of a function with a single argument of type S and its result of type T is represented as S → T.
The type of a function with a single argument of type S and its result of type T is represented as S → T.
The type declaration 'type Pixel is array (Color) of Boolean;' creates an array of Booleans indexed by the elements of 'Color'.
The type declaration 'type Pixel is array (Color) of Boolean;' creates an array of Booleans indexed by the elements of 'Color'.
"type Xrange is range 0 .. 511;
type Yrange is range 0 .. 255;
type Window is
array (YRange, XRange) of Pixel;"
The cardinality of the 'Window' type, which is an array of 'Pixel', is 8^256 × 512.
"type Xrange is range 0 .. 511; type Yrange is range 0 .. 255; type Window is array (YRange, XRange) of Pixel;" The cardinality of the 'Window' type, which is an array of 'Pixel', is 8^256 × 512.
In a disjoint union, a value is chosen from one of several different types represented by S + T.
In a disjoint union, a value is chosen from one of several different types represented by S + T.
What is the cardinality of the type 'Integer-List' defined as nil + cons(Integer × Integer-List)?
What is the cardinality of the type 'Integer-List' defined as nil + cons(Integer × Integer-List)?
In the context of lists, what does it mean for a list to be heterogeneous?
In the context of lists, what does it mean for a list to be heterogeneous?
What is the primary characteristic of a recursive type?
What is the primary characteristic of a recursive type?
In the context of lists, what is the purpose of the tail of a non-empty list?
In the context of lists, what is the purpose of the tail of a non-empty list?
What differentiates a composite type from a primitive type?
What differentiates a composite type from a primitive type?
Which of the following best describes the data structure used in the given Java list class declaration?
Which of the following best describes the data structure used in the given Java list class declaration?
"type IntNode;
type IntList is access IntNode;
type IntNode is record
data: Integer;
tail: IntList;
end record;"
In the given Ada list type declaration, what does the 'access' keyword indicate about the 'IntList'?
"type IntNode; type IntList is access IntNode; type IntNode is record data: Integer; tail: IntList; end record;" In the given Ada list type declaration, what does the 'access' keyword indicate about the 'IntList'?
What is the fundamental difference between how strings are treated in Haskell and Ada?
What is the fundamental difference between how strings are treated in Haskell and Ada?
Which programming languages are examples of statically typed languages?
Which programming languages are examples of statically typed languages?
What is the distinguishing feature of dynamically typed programming languages?
What is the distinguishing feature of dynamically typed programming languages?