Question no. 1 Write a C++ program, which declares an array of ten (10)integers.
ID: 3614133 • Letter: Q
Question
Question no. 1
Write a C++ program, which declares an array of ten (10)integers. This array is then passed to a function with the name“EvenTotal(…)”. The function“EvenTotal(…)” has following declaration:
int EvenTotal (int * ptrArray, int Size);
This function is called from main function. It takes the addressof first array element and size of array as arguments, it then usesa loop structure to calculate the sum of all the even integers inthe array, the sum is then returned to main function, which thenprints this number on console. E.g.
For the array:
int array[10]= {1,2,3,4,5,6,7,8,9,10}
It will print the following output:
Question no. 2
For each expression in Column-1, find the appropriateexpression from Column-2 and write the answer inColumn-3.
Column-1
Column-2
Column-3 (Answers)
Dos Programming
GUI
Windows
Typedef
Cout<< *ptr;
No Multitasking
Creates synonym for some datatype
Structure
Collection of variables under single name
Pointer de-referencing
Column-1
Column-2
Column-3 (Answers)
Dos Programming
GUI
Windows
Typedef
Cout<< *ptr;
No Multitasking
Creates synonym for some datatype
Structure
Collection of variables under single name
Pointer de-referencing
Explanation / Answer
Question no. 2
For each expression in Column-1, find the appropriateexpression from Column-2 and write the answer inColumn-3.
Column-1
Column-2
Column-3 (Answers)
Dos Programming
GUI
Windows
Typedef
Cout<< *ptr;
No Multitasking
Creates synonym for some datatype
Structure
Collection of variables under single name
Pointer de-referencing
Column-1
Column-2
Column-3 (Answers)
Dos Programming
GUI
NoMultitaskingWindows
Typedef
GUICout<< *ptr;
No Multitasking
Pointerde-referencingCreates synonym for some datatype
Structure
TypeDefCollection of variables under single name
Pointer de-referencing
StructureRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.