Download - Quiz by Joseph Lindo
![Page 1: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/1.jpg)
Page 1
Quizby Joseph Lindo
![Page 2: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/2.jpg)
Page 2
Program Analysis by providing the output of a program snippet
Some are true or false
Some have choices
![Page 3: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/3.jpg)
Page 3
Question1. What is the output of the program below?
int[] num = new int [5];System.out.println(num.length);
![Page 4: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/4.jpg)
Page 4
Question2. What is the output of the program below?
int[] num = {3,4,2,7,8,10,30};System.out.println(num.length);
![Page 5: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/5.jpg)
Page 5
Question3. What is the output of the program below?
int[][] num = new int [5][3];System.out.println(num.length);
a) 3b) 5c) 15d) 0e) null
![Page 6: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/6.jpg)
Page 6
Question4. What is the output of the program below?
int[] num = {3,4,2,7,8,10,30};System.out.println(num[5]);
![Page 7: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/7.jpg)
Page 7
Question5. What is the output of the program below?
int[] num = {3,4,2,7,8,10,30};System.out.println(num[7]);
a) 30b) 10c) Error messaged) 0e) null
![Page 8: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/8.jpg)
Page 8
Question6.
Single Dimension : ListThree Dimension : ___________
![Page 9: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/9.jpg)
Page 9
Question7. True or falseOnce the size of an array has been specified, it is still can be resize on the later part of the program.
![Page 10: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/10.jpg)
Page 10
Question8 . What is the output of the program below?
int[] num = {3,4,2,7,8,10,30};System.out.println(‘‘num.length’’);
![Page 11: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/11.jpg)
Page 11
Question9 . What is the output of the program below?
int[][] num = new int[5][6];int x = num.length;System.out.println(x);
![Page 12: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/12.jpg)
Page 12
Question10 . What is the output of the program below?
int[][] num = new int[5][6];int x = num[5].length;System.out.println(x);
a.6b.5c.0d.Error message
![Page 13: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/13.jpg)
Page 13
Question11 – 15 . What is the output of the program below?
int[] num = {3,4,2,7,8,10,30};for(int i=num.length-1; i>1;i--){
System.out.println(num[i]);}
![Page 14: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/14.jpg)
Page 14
Question16 . What is the index combination of the colored cell?
a) arr[3][4]b) arr[arr.length-1][2]c) arr[4][2]d) arr[4][3]
![Page 15: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/15.jpg)
Page 15
Question17.
Single Dimension : ListTwo Dimension : ___________
![Page 16: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/16.jpg)
Page 16
Question18. True or falseArray stores multiple data types.
![Page 17: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/17.jpg)
Page 17
Question19. True or falseIndex of an array always start from 0 up to array.length.
![Page 18: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/18.jpg)
Page 18
Question20 . What is the equation to be used to display the full size of the array?int[][] num = new int[5][6];int x = ??System.out.println(x);
a.num.length*num[0].lengthb.num.length*num[4].lengthc.num.length*num[5].lengthd.All of the abovee.None of the abovef. A and B onlyg. A and C only
![Page 19: Quiz by Joseph Lindo](https://reader038.vdocuments.us/reader038/viewer/2022110210/56812b33550346895d8f3f9a/html5/thumbnails/19.jpg)
Page 19
Question21-25. What is the output of the program below?
int[] num = {3,4,2,7,8,10,30};for(int i=num.length-3; i>=1;i--){
System.out.println(num[i-1]);}