How do you access elements of an array?

What will be an ideal response?


Use var = arrayName[index] to get the value at the index in the array. Use arrayName[index] = var; to set the value at the index in the array to the value in var.

Computer Science & Information Technology

You might also like to view...

What would be the value of discountRate after the following statements are executed?

``` double discountRate = 0.0; int purchase = 1250; if (purchase > 1000) discountRate = .05; if (purchase > 750) discountRate = .03; if (purchase > 500) discountRate = .01; else discountRate = 0; ``` a. .05 b. .03 c. .01 d. 0

Computer Science & Information Technology

What technology is used in touchpads?

A. optical technology B. mechanical motion C. gesture recognition D. capacitance technology

Computer Science & Information Technology

MySQL can be installed on ____ servers.

A. method B. integrated C. Windows D. either a or b

Computer Science & Information Technology

________ costs individuals and businesses millions of dollars every year through viruses, malware, online credit card fraud and phishing, or e-mail scams

Fill in the blank(s) with correct word

Computer Science & Information Technology