Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Arrays can be passed by value. (Points : 5) True False 2. A 2D dynamic array

ID: 3563193 • Letter: 1

Question

1. Arrays can be passed by value. (Points : 5) True False

2. A 2D dynamic array can be created using a regular pointer (Points : 5) True False

3. A struct can be a member of another struct (Points : 5) True False

4. Sorting an array takes less computation than a sequential search (Points : 5) True False

5. An array can have elements of different data types (Points : 5) True False

6. A Struct can have members of different data types (Points : 5) True False

7. Which one of the following array declarations is invalid? (Points : 5) int a[4]; int b[56]; float a[]={4,5,6}; int a[-10];

8. What is the error in the following code fragment?

struct employee{
string name;
int age;
};

employee John;

pic one- John is not defined.... Class is not defined.... No error..... Array is missing

9. Array is a reserved keyword (Points : 5) True False

10. Arrays require the inclusion of a specific C++ library file (Points : 5) True False

11. Template is a reserved keyword (Points : 5) True False

12. What symbol is used to denote a destructor? (Points : 5) !... @.... #.... none of the above

13. What is the output of the following piece of code? int a[5]; cout << a; (Points : 5) The entire array contents 0 Error The memory address of the first element of the array

14. Templates are used to increase the size of arrays (Points : 5) True False

Explanation / Answer

1. False

2. True

3. True

4. False

5.False

6.True

7.int a[-10];

8.you need to typedef it
typedef struct employee employee

9. False

10.True

11.True

12. ~

13. it will print the 0th element i.e 0

14.False