The code that will swap the first two elements of an array called friends is:

a) friends[0] = friends[1];
friends[1] = friends[0];
b) temp = friends[1];
friends[2] = friends[1];
friends[1] = temp;
c) temp = friends[0];
friends[1] = friends[0];
friends[0] = temp;
d) temp = friends[0];
friends[0] = friends[1];
friends[1] = temp;


d) temp = friends[0];
friends[0] = friends[1];
friends[1] = temp;

Computer Science & Information Technology

You might also like to view...

What should you define if you want to grant several users the same permissions to database objects?

A. schema B. user C. role D. access list

Computer Science & Information Technology

The ________ utility of Access helps reduce the size of a database

Fill in the blank(s) with correct word

Computer Science & Information Technology

?A(n) _________ is a list of paragraphs with a special symbol to the left of each paragraph. A. ordered list B. bulleted list C. numbered list D. definition list

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What is the type of monitoring data (for Amazon EBS volumes) which is available automatically in 5-minute periods at no charge called?

A. Basic B. Primary C. Detailed D. Local

Computer Science & Information Technology