Elementary Data Types - scalar and composite types, properties of types and objects - Question Bank
1. The specific value held by a variable at a particular moment in time is a property of the:
2. Which of the following data types is generally considered 'composite' because it can store a collection of elements?
3. The 'behavior' of a data type, such as what operations can be performed on it, is part of its:
4. What is the fundamental difference between a scalar type and a composite type?
5. When a program checks if an operation is valid for a given variable's type (e.g., dividing a string by a number), it is enforcing:
6. The property defining the set of possible values for a `char` type typically includes:
7. A `struct` in C is a classic example of a _________ data type.
8. Which of the following is an example of a scalar type in C++?
9. In programming, what is the relationship between a 'type' and an 'object'?
10. The 'type' of a variable defines its:
11. Which of the following best describes a 'composite type'?
12. The set of operations like comparison (`<`, `>`, `==`) is a property of:
13. A 'record' or 'struct' is a composite type because:
14. What is a key property of scalar types regarding their values?
15. Consider a variable `pi` declared as `float`. The value `3.14159` is:
16. Which term describes a data type that is not explicitly defined by the user but is provided by the programming language itself?
17. The concept of 'type compatibility' relates to:
18. A 'tuple' in some programming languages is a _________ data type, similar to a fixed-size array or record.
19. Which of the following is a property of the `String` type in most languages?
20. When discussing 'objects', their 'state' typically refers to:
21. What is a defining characteristic of a type like `enum` (enumeration)?
22. The ability to assign a value to a variable is an example of an:
23. Which programming construct allows grouping related data items, potentially of different types, under a single name, forming a composite type?
24. A pointer is often considered a _________ type, as it holds a memory address.
25. Which of the following is a common property that varies between different integer types (e.g., `short`, `int`, `long`)?
26. In the context of data types, 'type safety' refers to:
27. What is the main difference between a 'type' and an 'object' (or variable) in terms of properties?
28. The 'size' of a data type (e.g., number of bytes it occupies in memory) is considered one of its:
29. Which of the following is a defining characteristic of a 'composite' type?
30. A data type that is built directly into the programming language, like `int` or `bool`, is often referred to as a:
31. Which of the following is a common characteristic of 'scalar' types across different programming languages?
32. Consider a variable `age` declared as an integer. The value `30` assigned to `age` represents:
33. What distinguishes an 'object' from a 'type' in object-oriented programming, concerning properties?
34. When we say an 'integer' type supports addition and subtraction, we are referring to its:
35. The property that defines the set of all possible values a variable of a certain type can hold is known as its:
36. Which of the following is NOT a property of a data type?
37. A 'char' or 'character' data type typically holds:
38. What is a 'struct' or 'record' in programming?
39. In many programming languages, what is the primary characteristic of a 'float' or 'double' type?
40. A 'string' data type, often used to represent text, is usually considered a _________ type.
41. Which type typically represents true or false values?
42. What is a fundamental property of a scalar type like an 'integer'?
43. An array is generally considered a _________ data type.
44. Which programming language concept allows a single name to refer to multiple values, often of the same type, arranged in a sequence?
45. What does 'properties of objects' typically encompass?
46. In programming, what are the 'properties of types' referring to?
47. Which of these is a common example of a composite data type?
48. What is a composite data type?
49. Which of the following is an example of a scalar data type?
50. Which of the following best describes a scalar data type in programming?