Question: 1. After the following code executes, what elements will be members of set3? set1 = set(['d', 'e', 'f']) set2 = set(['a', 'b', 'c', 'd', 'e'])

1.

After the following code executes, what elements will be members of set3?

set1 = set(['d', 'e', 'f'])

set2 = set(['a', 'b', 'c', 'd', 'e'])

set3 = set2.difference(set1)

2.

After the following code executes, what elements will be members of set3?

set1 = set(['d', 'e', 'f'])

set2 = set(['a', 'b', 'c', 'd', 'e'])

set3 = set1.difference(set2)

3.

Which of the below logical comparisons can be performed using test condition in shell scripting?

a.

Numeric comparison

b.

String comparison

c.

Both a and b

d.

None of the above

4.

What is the output of the following code:

os = Unix

echo 1.$os 2."$os" 3.'$os' 4.$os

a.

1.Unix 2.Unix 3.Unix 4.Unix

b.

1.Unix 2.Unix 3.$os 4.Unix

c.

1.Unix 2.Unix 3.Unix 4.$os

d.

1.Unix 2.$os 3.$os 4.$os

5.

Any command surrounded by backquote is executed by shell and its output is inserted in the place it was found. This is known as

a.

Command replacement

b.

Parsing

c.

Command substitution

d.

Command execution

6.

The first line of a shell program beginning with #! is called

a.

interpreter line

b.

hash-bang line

c.

she-bang line

d.

All the above

7.

If a script is run as foo -l -t test[1-3], what is the value of $*, given that the files test1, test2 and test3 exist?

a.

-l -t bar1 bar2 bar3

b.

-l -t

c.

bar1 bar2 bar3

d.

None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!