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
My name is Ann [436]
2 years ago
6

The function's only behavior should be to return the sum of array userVals' elements. What common error does the function make?

Computers and Technology
1 answer:
lara31 [8.8K]2 years ago
7 0

Answer:

A. Attempts to access an invalid element.

Explanation:

The C program above is supposed to loops 10 times to get the total of the userVal's element, but the loop is assigning the cumulative sum of the to each nth index of the userVal array. Although the cumulative total of the array is assigned to the last index, the return statement is attempting to return an invalid element (since i is local only to the for loop statement). The program should return the userVal[9] instead.

You might be interested in
Do you want my hero academia?<br><br><br><br><br><br> if so, who's your favorite character :&gt;
VMariaS [17]

Shoto Todoroki and Katsuki Bakugo

4 0
2 years ago
Read 2 more answers
What are Manuscript signs​
mihalych1998 [28]

Answer: See explanation

Explanation:

Manuscript signs, refers to the marks or the symbols that are used within a manuscript in order to show the necessary corrections which should be made during the preparation of a document.

Manuscript formatting is vital as it makes the manuscript easier to assess. In a situation whereby manuscripts are poorly formatted, it can be turned down by agents and publishers.

5 0
2 years ago
Your team at amazon is overseeing the design of a new high-efficiency data center at hq2. a power grid need to be generated for
elixir [45]

Answer:

void print2(int row) {

for (int i = 0; i < row; i++) {

 char ch = 'a';

 char print = ch;

 for (int j = 0; j <= i; j++) {

  cout << print++;

 }

 cout << endl;

}

}

int count_digits(int num) {

int count = 0;

int temp = num;

while (temp != 0) {

 temp = temp / 10;

 count++;

}

return (num % count);

}

Explanation:

3 0
2 years ago
Entering the formula =SUM(C5:C18) in cell C19 will result in which of the following?
frozen [14]
Well the result shown in C19 will show the sum of all cells from C5 to C18:
ie: C5 + C6+ C7+ C8+ C9+ C10+ C11+ C12+ C13+ C14+ C15+ C16+ C17+ C18

:)
3 0
2 years ago
How does polymorphism enable you to program "in the general" rather than "in the specific"? Discuss the key advantages of progra
barxatty [35]

Answer:

Explanation:

When programming in an OOP language classes are created to represent real-life objects, people, places etc. from the real world. Programming in the general allows you to cut down your code and making it more efficient by applying the same necessary functions to all of the objects that classify under the same category. For example by programming "in the general" and creating an Animal class you can create all of the functions/behaviors that animals tend to have. Then you can apply these functions/behaviors to various animals such as a Cat, Dog, Horse, etc. But if you program in the specific you cannot apply a Cat class to a Dog since they are not the same thing.

4 0
2 years ago
Other questions:
  • A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
    8·1 answer
  • ________ is a remote access client/server protocol that provides authentication and authorization capabilities to users who are
    10·1 answer
  • Name a piece of software you often use where it is easy to produce an error. Explain ways you could improve the interface to bet
    5·1 answer
  • Which of the following is NOT a fall prevention system?
    12·2 answers
  • Write a C# program named DoubleDecimalTest thatdeclares and displays two variables - a double and a decimal.Experiment by assign
    9·1 answer
  • What starts with p and ends with orn
    15·2 answers
  • The most important part of a computer​
    14·2 answers
  • How to add a legend to a graph in excel?
    7·2 answers
  • Question 7 (1 point)
    10·1 answer
  • 2. How can Tailwind Traders ensure applications use geo-redundancy to create highly available storage applications?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!