Answer the following statements true (T) or false (F)
1) To refer to a particular location or element within an array, we specify the name of the array’s variable and the value of the particular element.
2) The declaration of a variable that references an array reserves memory for the array.
3) To indicate that 100 locations should be reserved for integer array p, the programmer writes the declaration
4) An app that initializes the elements of a 15-element array to 0 must contain at least one for statement.
5) To total the elements of a two-dimensional array you must use nested for statements.
1) False. The name of the array’s variable and the index are specified.
2) False. Memory for arrays must be dynamically allocated in C# with new or by specifying an initializer list to initialize the array’s elements. p[100];
3) False. The correct declaration is int[] p = new int[100];
4): False. Numeric arrays are automatically initialized to zero. Also, a member initializer
list can be used, or other repetition statements could be used, or individual assignment statements could be used.
5) False. It is possible to total the elements of a two-dimensional array by adding all the elements in a single assign
You might also like to view...
A range of cells that shows how changing certain values in your formulas affects the results of those formulas.
A. Data table B. Table array C. Validation list
A virus has been removed from the users machine, but the user still cannot access the Internet. Which of the following should the technician check NEXT?
A. Disable port forwarding on the router. B. Reboot to Safe Mode and see if the Internet is accessible. C. Format the machine and reinstall the OS. D. Check the web browsers proxy settings.