1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Assoli18 [71]
3 years ago
14

When an application contains an array and you want to use every element of the array in some task, it is common to perform loops

that vary the loop control variable from 0 to one less than the size of the array.
A) True
B) False
Computers and Technology
1 answer:
Elodia [21]3 years ago
7 0

Answer:

 Option A(True) is the correct answer for the above question.

Explanation:

  • An array is used for the collection variables which is of the same type and uses memory in continuous Passion for the storage.
  • When any user wants to use the array then he needs to declare the size and type of the array because array holds the same type of data.
  • For example, int a[5] is an array of integer variable whose name is 'a' and the size is 5 in c language.
  • Anyone can use the array with the help of the index value of the array. The starting index value is 0 and the ending index value is (size-1) for any array.
  • The user can use it by the help of loop, in which the loop variable refers to the index of the array and it starts from 0 and ends in the (size of the array-1).
  • It is because the loop executes the same line multiple times.
  • The above statement also wants to state, which is defined as above. Hence the above statement is true which is referred by option A. Hence option A is the correct answer.
You might be interested in
Write a MATLAB program using afor loopto determine the number of values thatarepositive, the number of values that are negative,
murzikaleks [220]

Answer:

see description

Explanation:

clicking in new script, we type the following:

%inputs and variables

N = input('Enter N : ');

values = input('Enter values : ');

positive=0;

negatives=0;

zero=0;

%for loop

for c = 1:N

   if values(c) > 0

       positive = positive + 1;

   elseif values(c) < 0

       negatives = negatives + 1;

   else

       zero = zero + 1;

   end

end

positive

negatives

zero

so we basically loop the array and add one to counters each time we read an element from the input, for example if we enter:

Example input

Enter N : 5

Enter values : [1,-1,0,2,352]

positive = 3

negatives = 1

zero = 1

7 0
4 years ago
The process of __________ encourages members to accept responsibility for the outcomes of a group and for changing the style in
soldier1979 [14.2K]

Answer:

The correct answer to the following question will be Option B (Interpersonal feedback).

Explanation:

  • Interpersonal feedback seems to be a mechanism under which someone talks. Individuals deliver a message regarding their sensations and expectations of actions by another.
  • It encourages employees to take obligation for a group's results and to change the look they correspond to many other people in.

Therefore, Interpersonal feedback is the right answer.

8 0
3 years ago
In which patten the modern computer work ?​
umka21 [38]

Answer:

Von Neumann describió el fundamento de todo ordenador electrónico con programas almacenados. Describía, a diferencia de como pasaba anteriormente, como podía funcionar un ordenador con sus unidades conectadas permanentemente y su funcionamiento estuviese coordinado desde la unidad de control (a efectos prácticos es la CPU). Aunque la tecnología ha avanzado mucho y aumentado la complejidad de la arquitectura inicial, la base de su funcionamiento es la misma y probablemente lo seguirá siendo durante mucho tiempo. El artículo viene acompañado de una representación gráfica del funcionamiento.

Explanation:

4 0
3 years ago
Suppose you were assigned to develop a logical model of the registration system at a school or college. would you be better off
Valentin [98]
<span>Top-down approaches are most often useful when solving problems such as these. Since all the data is already available, taking the overall problem and breaking it down into smaller parts (with more detail as each level is attained) helps to make the overall task easier.</span>
5 0
3 years ago
Easter Sunday is the first Sunday after the first full moon of spring. To compute the date, you can use this algorithm, invented
tatuchka [14]

Answer:

# The user is prompted to enter the year

# the entered year is assigned to y

y = int(input("Enter the year: "))

# the remainder when y is divided by 19 is assigned to a

a = y % 19

# The quotient is assigned to b when y is divided by 100

b = y // 100

# The remainder is assigned to c when y is divided by 100

c = y % 100

# The quotient is assigned to d when b is divided by 4

d = b // 4

# The remainder is assigned to e when b is divided by 4

e = b % 4

# The quotient is assigned to g when 8 * b + 13 is divided by 25

g = (8 * b + 13) // 25

# The remainder is assigned to h when 19 * a + b - d - g + 15 is divided by 30

h = (19 * a + b - d - g + 15) % 30

# The quotient is assigned to j when c is divided by 4

j = c // 4

# The remainder is assigned to k when c is divided by 4

k = c % 4

# The quotient is assigned to m when a + 11 * h is divided by 319

m = (a + 11 * h) // 319

# The remainder is assigned to r when 2 * e + 2 * j - k - h + m + 32 is divided by 7

r = (2 * e + 2 * j  - k - h + m + 32) % 7

# The quotient is assigned to n when h - m + r + 90 is divided by 25

n = (h - m + r + 90) // 25

# The remainder is assigned to p when h - m + r + n + 19 is divided by 32

p = (h - m + r + n + 19) % 32

# The date of easter is displayed

print ("Easter falls on day ", p, "of month ", n);

Explanation:

The code is written in Python and is well commented. A sample image of program output is attached.

5 0
4 years ago
Other questions:
  • Discuss how advertising on the Web affects search results and the ethical dilemmas associated with it.
    5·1 answer
  • List five ways in which the type declaration system of a language such as Java or C differs from the data definition language us
    8·1 answer
  • Time complexity: Be sure to show your work. Suppose that a particular algorithm has time complexity T (n) = 10 ∗ 2n, and that ex
    7·1 answer
  • When the continue statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignore
    5·1 answer
  • Animations and transitions are added from the _____.
    11·2 answers
  • In this section, you will use a stack to implement a program that checks if a string is balanced. Use the skeleton code provided
    5·1 answer
  • with the current computer development, explain 5th areas where computer is applied for the social economic dwvelopment in societ
    11·1 answer
  • You can enter the following things in cells
    10·1 answer
  • Enter a formula in cell C13 to look up the registration fee for the first vehicle. Use the vehicle type in cell C4 as the Lookup
    9·1 answer
  • What are the answers to these Python programs
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!