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

  Finding median by black-box worst-case linear-time algorithm

Given a black-box worst-case linear-time algorithm for ?nding median, create algorithm solving the selection problem for an arbitrary order statistic.

  Dynamic-programming algorithm for rod-cutting problem

Consider a modification of the rod-cutting problem in which, in addition to a price pi for each rod, each cut incurs a fixed cost of c. Give a dynamic-programming algorithm to solve this modified problem.

  Algorithm on dynamic programming-minimize amount of walking

Our goal is to plan this trip so that we minimize the maximum amount of walking done in a single day. Your algorithm should be based on dynamic programming and run efficiently.

  Describe implementation of algorithm on simd computer

Describe an implementation of that algorithm on an SIMD computer where the processors are connected to form a linear array

  Algorithm to minimize average difference between height

The problem is to assign each skier a ski to minimize the average difference between height of a skier and his/her ski. Give pseudocode and write its asymptotic running time.

  Design algorithm to produce list of customers

Design an algorithm to produce a list of customers from the Glad Rags Clothing Company's customer master file. Each record on the customer master file contains the customer's number.

  Generalize 2-3 algorithms for insert and delete

Generalize the 2-3 algorithms for INSERT and DELETE to K-J trees, where non-leaf vertices have between K and J children for fixed integers K >=2, and J>= 2K-1.

  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.

  Give time algorithm that outputs satisfying assignment

Find out  whether there is an assignment of true/false values to the literals such that at least a*m clauses will be true. Note that 3-SAT(1) is exactly the 3-SAT problem. Give an O(m*n)-time algorithm that outputs a satisfying assignment for 3-S..

  Function to swap all the left-right subtrees of binary tree

Write a function, swapSubTrees, that swaps all of the left and right subtrees of a binary tree. write a method singleParent, that returns the number of nodes in a binary tree that have only one child.

  Write algorithm using pseudo code consensus algorithm

Write an algorithm, using pseudo code, "Consensus algorithm": A group of ten people need to decide which one flavor of ice cream they will all order, out of three options.

  Data structures assignment requiring c++ program

You should build enough new roads such that if City A was reachable from City B via some old roads, City A must be reachable from City B via some new roads.

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