What values are placed in the array by the above statements

Assignment Help Basic Computer Science
Reference no: EM13805266

Question 1. Where does the element referred to with the number zero exist in an array?

One element before the first

The first element

It is determined by the declaration of the array.

It would depend on how the array is opened, once declared.

Question 2.Which of the following is false?

All elements in an array have the same subscript.

All elements of the array have the same data type.

All elements in an array have the same name.

The first element of the array has a subscript of zero.

Question 3. Suppose that we declare array foodArray() as having four elements, with corresponding values of "Bread," "Milk," "Banana," and "Sugar." What value will foodArray(2) concatenated with foodArray(0) have?

Milk Sugar

Banana Sugar

Milk Bread

Banana Bread

Question 4. An array can store multiple variables known as _____.

subscripts

a subscripted constant

indices

elements

Question 5. What exception message would be issued by the system if your program attempts to access an array with a subscript value greater than the number of elements declared in the array?

"Array dumped to memory"

"Index was outside the bounds of the array"

"Invalid access: Retry, Cancel, or Abort?"

"Unhandled exception"

Question 6. The easiest way to traverse an array or sequentially access each element in an array is to _____.

do a binary search

sort the array and read it

use a loop statement

use sequential coding

Question 7. _____ can be used when data needs to be stored in a tabular format consisting of multiple rows and columns.

Two-dimensional arrays

Indexed subscripts

Complex subscripts

List indexes

Question 8. What is the upper bound of the array score(), declared in the following line of code?

Dim score() As Integer = {55, 33, 12} (Points : 3)
2

0

11

1

Question 9. The ReDim statement causes an array to lose its current contents unless the word ReDim is followed by which keyword?

Preserve

Keep

Reserve

Conserve

Question 10. Given the Dim statement below, which set of statements will initialize all elements of myArray() to 100?

Dim myArray(100) As Double (Points : 3)
For j = 0 to 100

myArray(j) = 100

Next

For i = 0 To 100

(i) = 100

Next

myArray() is already initialized to 100 by the Dim statement.

myArray = {100}

Question 11. Consider the following Visual Basic statements:

Dim nums(4) As Double

For index As Integer = 0 To 4

nums(index) = 1 + (index * 2)

Next

What values are placed in the array by the above statements? (Show each element of the array and the value for that element.)

Reference no: EM13805266

Questions Cloud

Competing needs of work groups : Leaders must frequently address competing needs of work groups. Conflict can arise when groups vie for limited resources. Addressing the conflict is essential to leading.
Protection and risk transfer in a situation at work : Discuss how you have used or might use risk protection and risk transfer in a situation at work. Compare these two risk resolution strategies.
Identify five different it systems : Identify five different IT systems that have affected business in the past few years
Project management regarding risk : How would you handle these conflicting objectives? What are your recommendations to project management regarding this risk? How does this scenario relate to managing contingency allowance?
What values are placed in the array by the above statements : Where does the element referred to with the number zero exist in an array? What values are placed in the array by the above statements? (Show each element of the array and the value for that element.
Write a literature review pertaining to the leadership : Assignment 2 is to conduct and write a literature review pertaining to the leadership topic you have chosen "Broken Window Theory". The literature review should be written using both primary and secondary sources. The literature review should be..
Sexuality in older adults : Sexuality in older adults
Project management life cycle theory : The general strengths attributable to the project management life cycle theory. Why the other project managers that you have chosen have done a commendable job from the perspective of the starting, planning, executing, and evaluating a project
Project management life cycle theory : In your opinion, what are the limitations of the project management life cycle theory? How would you improve the project management plans of two other project managers if you were the project manager of their respective projects? Be supportive and ..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Few techniques to incorporate to site

Did you know that you do not have to start from scratch if your site is not accessible? There are a few techniques you may incorporate to your site.

  Concept and include strengths and weaknesses of papers

Analyse those papers and make a document with usual report format such like Abstract, Introduction, body, conclusion and references and also appendix.

  Write structured english for clyde-s narrative policies

Lasting more than one day, we permit hotel, taxi, and airfare, also meal allowances. Same times apply for meal expenses." Write down structured English for Clyde's narrative of reimbursement policies.

  Develop an effective research plan considering context

Develop an effective research plan considering context, research questions, sources, timeline, and larger implications for writing a formal research report

  Multiplexors whose control bit allows

Multiplexors whose control bit allows you to select between one of two modes right shift or left shift. Include logic to perform arithmetic shift left and arithmetic shift right . This means you must include logic to perform sign extension in ..

  How to solve performance problem of computer

Your friend recommends upgrading RAM to 256 MB to correct performance problems. Is there any other way to solve performance problem? Justify your answer.

  Cores on computer systems

Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency,

  What is the expected total number of tickets receive

In an arcade, you play game A 10 times and game B 20 times. Each time you play game A, you win with probability 1/3 (independently of the other times), and if you win you get 3 tickets (redeemable for prizes), and if you lose you get 0 tickets. Game ..

  What are the practical benefits

What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. import java.net.* versus import java.net.Socket)?

  Crew may not be used to radio calls if the system breaks

Crews may become too reliant on the text or chat system. Crew may not be used to radio calls if the system breaks.

  Write the code to read the name of a baseball team

Write the code to read the name of a baseball team, the number of games won, and the number of games lost, and display the name of the team and the percentage of games won.

  How dui charges of domestic violence and influence career

Sensitive information and may end up in court as technical or expert witness. How can things like a DUI, charges of domestic violence and other items influence your career?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd