Which one of the following statements assigns the string "Pickles" to the name member of cats[2]?

36. Look at the following code sample that creates an array of Pet structure objects:

```
struct Pet
{
public string name;
public int age;
public string type;
}

const int SIZE = 4;
Pet[] cats = new Pet[SIZE];

```

a. "Pickles" = cats[2];
b. cats[2].name = "Pickles";
c. cats.name[2] = "Pickles";
d. cats[2].name("Pickles");


c. cats.name[2] = "Pickles";

Computer Science & Information Technology

You might also like to view...

Software refers to

a. programs b. the physical components a computer is made of c. firmware d. data stored in RAM

Computer Science & Information Technology

Use the readonly (Sobell, page 315) builtin to make the myname variable you created in the previous step a readonly variable and then assign a new value to it. What happens?

What will be an ideal response?

Computer Science & Information Technology

Answer the following:

(a) The equivalence

where a1 and a2 are disjoint subsets of a satisfying a = a1
U a2 holds under certain conditions on a1, a2, and c. State the conditions.

(b) Using the schema:
Sailors(sid: integer, sname: string, rating: integer, age: real)
key - sid
Boats(bid: integer, bname: string, color: string)
key - bid
Reserves(sid: integer, bid: integer, day: date)
key - sid, bid, day

(c) Consider the SELECT statement:


SELECT S.sname, S.rating
FROM Sailors S, Reserves R
WHERE S.sid = R.sid AND R.day = '5/11/98'

which uses the schema of (7b). Express it as an unoptimized relational algebra expression
using the operators natural join, select, and project.

(d) Give an equivalent relational algebra expression for the same query that can be evaluated
more eciently. Explain why you expect more ecient evaluation (no numbers).

Computer Science & Information Technology

Which of the following is NOT an element of a shape that you can change to modify its appearance?

A. Style B. Dimensionality C. Outline D. Fill

Computer Science & Information Technology