CS202 Array Exercise spr2008

CS202 Array Exercise spr2008 - CS201 Array Exercise 1....

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. Don't write the following programs. But, if you DID write them, would you need an array? Circle a) Read in 10 integers and print only the largest. Yes No b) Read in 10 integers and print them in reverse order. Yes No c) Read in 10 integers and sort them in order from smallest to largest. Yes No d) Read in 10 integers and print only the sum. Yes No e) Read in 10 integers and print only the average. Yes No f) Read in 10 integers and print only the numbers which are above average.Yes No 2. Give the statements that declare tests and quizzes to be arrays that can store 20 integer values. Give the subscript range. 3. Give the statement that declares apple to be a string array that can store 100 strings. Give the subscript range. 4. Give the statement(s) that will: a) assign a value of 332 to the 3 rd element of tests. b) put "delicious" in the 5 th element of apple. c) put the value located in the 3 rd element of tests into the 8 th element of quizzes. d)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

CS202 Array Exercise spr2008 - CS201 Array Exercise 1....

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online