59.7k views
3 votes
Mark the following statements as true or false. a) A double type is an example of a primitive data type. b) A one-dimensional list is an example of a structured data type. c) Lists can be passed as parameters to a method. d) A method can return a value of the type list. e) The size of a list is determined at compile time

1 Answer

3 votes

Answer:

(a) true

(b) true

(c) true

(d) true

(e) false

Step-by-step explanation:

(a) Primitive data types are the most basic data types in programming. They can hold only a single value. A double type is an example of a primitive data type. Other examples are integers, booleans, e.t.c

(b) A data is a structured type if each of its data items is a collection of other data items. A one-dimensional list is a great example.

(c) Parameters are used by methods to perform a specific task. About any data type could be used as a parameter to a method. Lists are no exemptions. For example, to write a method that sorts a list, the list could be passed as argument/parameter to that method.

(d) A method is allowed to return a single value. This value can be of any logical type such as a List, double, string e.t.c.

(e) A list is a dynamic or variable length array and as such its size is determined only at run time.

User Timoteo
by
5.0k points