Creating an array

Assignment Help Data Structure & Algorithms
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)

 

Reference no: EM1380182

Questions Cloud

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.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Write algorithm to create job applicant report

Write the algorithm to create job applicant report. Input consists of a series of records that contain the Social Security number or equivalent, last name, first name, middle initial.

  Describe why full binary tree requires to have node

Describe why. Full binary tree requires to have a node with 0 or 2 children and complete tree have their child starting from left. Choose the one true statement. Every binary tree is either complete or full.

  Create time algorithm-minimum time required to finish task

Create the O(|V | + | E |) time algorithm which, given times ti and the dependencies, determines minimum time required to complete all the tasks.

  Explain eager decision tree algorithm-lazy knn algorithm

Discuss the advantages and disadvantages of the new algorithm compared with the eager decision tree algorithm, and the advantages and disadvantages of the new algorithm compared with the lazy kNN algorithm.

  Use sequential search algortithm to locate the number

These numbers should be stored in an array. Use the sequential search algortithm to locate the number entered by the user. If the number is in the array, the program should display a message.

  Create efficient algorithm to find path in graph

Given connected undirected graph G described by the adjacency list representation create the efficient algorithm to find the path in G which goes through exactly once in each direction.

  Find maximum possible amount of money by optimal strategy

Removes it from row permanently, and receives value of coin. Find out the maximum possible amount of money we can definitely win if we move first.

  Creating class diagram

Think about a computer system used to manage loans for a library. Libraries loan books, CDs, videos and magazines to registered members.

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Create algorithm to perform any sequence of two operations

Let A[1, n] be an array of real numbers. Create an algorithm to perform any sequence of the following two operations: Add(i, x): add the value x to A[i].

  Graph in which every node is pivotal for at least two nodes

Give an example of a graph in which every node is pivotal for at least two di fferent pairs of nodes. Explain your answer.

  Data structures for a single algorithm

Data structures for a single algorithm

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd