1. Statements 1, 2, 4, 6, 7, 8, 10, 12, 13, 15, 19, and 20 are true, while statements 3, 5, 9, 11, 14, 16, and 17 are false.
2. True statements include that a function performs a specific task, can have arguments and return values, expressions can be used as array subscripts, pointers can point to functions, functions can have structures as arguments and return structures, functions can return pointers, recursive functions call themselves, and pointers contain the address of other variables.
3. False statements include that one for loop can process 2D arrays, arrays cannot contain pointers, local variables are called global, arrays sort and
Please indicate which of the following are TRUE and which are FALSE-.docx
1. Please indicate which of the following are TRUE and which are FALSE:
1. A function is a program module that performs a specific well defined task.
2. A function can have zero or more arguments as input and zero or more return value.
3. We can use one for loop to process a two dimensional arrays.
4. An expression that evaluates to an integer can be used as an array subscript.
5. Arrays may not contain pointers.
6. A pointer to a function is the address where the code for the function resides.
7. A function can have a structure as an argument.
8. A function can return a structure.
9. A string that is a character pointer, can not be a function argument.
10. A function can return a pointer.
11. A variable that is known only within the function in which it is defined is called global
variable .
12. In C++, it is possible to have various functions with the same name that operate on different
types or numbers of arguments.
13. A function that calls itself either directly or indirectly (i.e., through another function) is a
recursive
function.
14. An array can store many different types of values.
15. An individual array element that is passed to a function and modified in that function will
contain
the modified value when the called function completes execution.
16. The process of placing the elements of an array in order is called searching the array.
17. The process of determining if an array contains a particular key value is called sorting the
array.
2. 18. An array that uses two subscripts is referred to as one dimensional array.
19. A pointer is a variable that contains the value of another variable.
20. The address operator & can be applied only to constants and to expressions.
Solution
The Answers are given below:
1. TRUE
2. FALSE
3. FALSE
4. TRUE
5. FALSE
6. TRUE
7. TRUE
8. TRUE
9. FALSE
10. TRUE
11. FALSE
12. TRUE
13. TRUE
14. FALSE
15. TRUE
16. FALSE
17. FALSE
18. FALSE
19. TRUE
20. FALSE