Reference no: EM1380182
2. Determine which of the following commands is used to create an array?
a.create
b.declare
c.function
d.source
3.You use the ______________ command to call a function library file.
a.create
b.declare
c.function
d.source
4.Which of the following commands is used to display all variables?
a.create
b.typeset
c.function
d.source
5.You use the ______________ command to create a function named Goals.
a.unset Goals
b.declare -a Goals
c.function Goals ()
d.source Goals
6.Which of the following commands is used to remove a function named Goals?
a.unset Goals
b.declare -a Goals
c.function Goals ()
d.source Goals
7.You use the ______________ statement to display all the values in an array named Beaches.
a.echo ${Beaches[0]}
b.echo ${Beaches[1]}
c.echo ${Beaches[#]}
d.echo ${Beaches[*]}
8.A ______________ refers to the element number in an array.
a.call
b.data value
c.subscript
d.return value
9.______________ is the process of breaking a programming task into smaller pieces.
a.Function calling
b.Subscripting
c.Indexing
d.Modularization
10.A ______________ activates a function.
a.function call
b.return value
c.subscript
d.function module
11.Which of the following commands is used to display the length of the data value located at subscript 5 in the array named Beaches?
a.echo ${Beaches[5]}
b.echo ${#Beaches[4]}
c.echo ${#Beaches[5]}
d.echo ${@Beaches[*]}
12.Which of the following commands is used to display the first value in the array named Beaches?
a.echo ${Beaches[0]}
b.echo ${Beaches[1]}
c.echo ${Beaches[2]}
d.echo ${Beaches[*]}
13.You use the ______________ command to declare a variable so it can only be used in a function.
a.global
b.function
c.declare -a
d.source
14.A value is ______________ to a function when the function is given the value to process.
a.called
b.returned
c.passed
d.evaluated
15.Which of the following commands is used to display the total number of data values in the array named Beaches?
a.echo ${Beaches[]}
b.echo ${*Beaches[#]}
c.echo ${#Beaches[*]}
d.echo ${@Beaches[*]}
16.Which of the following declares an array named States with the elements Florida, Georgia, Maine, Montana, and Alabama?
a.states=(Florida Georgia Maine Montana Alabama)
b.states[]=(Florida Georgia Maine Montana Alabama)
c.states[01234]=(Florida Georgia Maine Montana)Alabama
d.function()=(Florida Georgia Maine Montana Alabama)
Creating two single dimension arrays
: Make two single dimension arrays that contain ten floating point numbers in each array. Make a third single dimension array to hold a sum.
|
Comparison of the applicability of array
: Data structures include: 1. a linked list, 2. an ordered, one dimensional array, and three. a binary tree. Assume the list of letters R, A, N, B, C, F, X and G are stored in a list.
|
Question about branch hazard
: Provide a relevant example using MIPS instruction set architecture. Discuss the similarities and differences of the code will proceed it the branch is taken, vs if the branch is not taken, and explain how this affects the pipeline.
|
Creating two arrays of integers
: Prepare two arrays of integers, each holding 10-elements of data. Make a third array of integers for a result array. The main program will take the 2-arrays of integers and pass them to the function subtract().
|
Creating an array
: Determine which of the following commands is used to create an array?
|
Java program to assign passengers seats in airplane
: Prepare a Java program to assign passengers seats in an airplane. Suppose a small airplane with seats numbered as follows:
|
Prepare a japplet with a jbutton
: Prepare a JApplet with a JButton labeled Who is number one and when the user clicks on button, display your favorite sports team. Save the document as JNumberOne.java.
|
C program that accepts a month and day
: Make a C program that accepts a month and day for example, June 14 from the keyboard as input. Store this data in a string called date.
|
Finding the values of queuefront and queuerear
: Assume that queue is a queue type object and the size of the array-implementing queue is 100. Also, assume that the value of the queueFront is 25 and the value of queueRear is twenty-five.
|