Assume the following declarations are made and indicate which items below are valid subscripted variables. int a[]

Question:

Assume the following declarations are made and indicate which items below are valid subscripted variables.
int a[] = new int[10];
char b[] = new char[6];
int x = 7, y = 2;
double z = 0.0;
a. a[0]
b. b[0]
c. c[1.0]
d. b['a']
e. b[a]
f. a[x + y]
g. a[x % y]
h. a[10]
i. c[-1]
j. a[a[4]]
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Statistical Inference

ISBN: 978-0534243128

2nd edition

Authors: George Casella, Roger L. Berger

Question Posted: