Recent Feedback
I have some quiz questions. There are 10 multiple choice and 1 short essay. They can be found here:http://wikisend.com/download/561582/Wk5Quiz.docxHere's the copy/paste1. (TCO 11) Which of the following is false? (Points : 3) All elements of the array have the same data type. All elements in an array have the same name. All elements in an array have the same subscript. The first element of the array has a subscript of zero.2. (TCO 11) Programmers often mistakenly reference the first element in an array with index1. What is this called? (Points : 3) Logic-error Index1-error off-by-one-error N-13. (TCO 11) A five-row, six-column array has a total of how many elements? (Points : 3) 1 36 30 114. (TCO 12) Given the following array:int profit [5] = {10, 20, 31, 55, 66}; The following statement would replace which value?profit [0] = profit[2]; (Points : 3) 10 with 31 10 with 20 20 with 31 10 with 555. (TCO 12) What is the character automatically included at the end of an array of characters? (Points : 3) \n \0 \z \*6. (TCO 11) In the following array, what is the value of table[0][0]?int table[4][3]={0,7,3,2,4,9,8,1,3,6,5,4};(Points : 3) 3 2 1 07. (TCO 11) What type of error will this code produce? int n[30], i;for(i = 0; i <= 30; ++i) n = i; (Points : 3) No compiler errors will be reported. A compiler error is generated since there are no braces {} with the for loop. A runtime error may occur because we are out of bounds on the array. No compiler errors will be reported, but a runtime error may occur because we are out of bounds on the array.8. (TCO 11) Is it possible to write code in this manner for a C++ program? #define size 20int main(){ int numbers[size];} (Points : 3) Yes, this is perfectly acceptable C++ code. No, the array dimension cannot be a variable. Yes, you could write it this way, but you would be wrong. None of the above9. (TCO 11) Given this function prototype void CalcTotal(float numbers[]), what is wrong with this function?void CalcTotal(float numbers) { float total; for(int I = 0; I < 6 ++I) { total = total + numbers; }} (Points : 3) The function is correct. There is a data type in the function header line. I is capitalized. The function header line doesn't match the prototype.10. (TCO 12) Which is not a reason pointers are valuable? (Points : 3) Pointers allow for faster access to array elements. Pointers speed the process of passing objects like classes to functions. Pointers allow function to be passed as an argument to other functions. Pointers involve a great deal of overhead when used in conjunction with arguments.11. (TCO 11) Explain how to determine the number of elements in a previously defined single-dimension array. Provide a C++ program segment that illustrates your answer. (Points : 5)
Optional Information: Computer OS: Windows 7 Browser: Firefox Programming Language: C++
Working on it. Please wait
Thanks, XXXXX XXXXX due for a few days so no hurry.
Thank you :)
Download answer from here. Wk5quiz.docx
Experience: Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.