Assume that an array named a containing exactly 5 integers has been declared and initialized. Write a single statement that adds 10 to the value stored in the first element of the array.

Answers

Answer 1
Answer:

Answer:

"a[0]=a[0]+10;", is the correct answer for the above question.

Explanation:

  • An array is defined as a user-defined data type used to store multiple variables of the same type in a continuous passion in a memory.
  • To declare an array a user needs to define the size and it referred many variables by one name but the index of that variable is different,
  • The array takes an index from 0 to (size-1). It means that the first index of the array is 0. So if the name of that array is A then the first variable name is A[0].
  • The above-question says that there is an array of name 'a' then its first variable name is a[0] then we can add 10 to its like "a[0]=a[0]+10". Here '=' is an assignment operator and '+' is an addition operator.

Related Questions

What part did advances in technology play in the creation of the “New Woman"? What group of women was largely excluded from this progress?
Blank includes websites that encourage interaction and connection among people ,business and organizations
What are certain things you can do to protect your personal data when using a public workstation? please check all that apply. sign out of account completely clear cache clear history clear cookies run a virus protection program before using the computer
Which Boolean operator enables you to exclude a search term?
The __________ is the system of official channels that carry organizationally approved messages and information.

What does “default” refer to? the ability to be used as, or directly converted to, cash. the failure to pay back a loan. the amount of money borrowed. the price paid for the use of borrowed money.

Answers

The answer is "the failure to pay back a loan".

In computer systems, we have a different meaning to the word default. It is referred to the setting or option in a computer upon opening a program or application. But according to the dictionary, default refers to the failure to make a payment such as a loan.

Reversing the elements of an array involves swapping the corresponding elements of the array: the first with the last, the second with the next to the last, and so on, all the way to the middle of the array. Given an array a and two other int variables, k and temp, write a loop that reverses the elements of the array. Do not use any other variables besides a, k, and temp.

Answers

Answer:

// Assume that all variables a, n, temp have been declared.

 // Where a is the array, n is the array length, temp is a temporary

 // storage location.

 // Cycle through the array a.

 // By the time the loop gets halfway,

 // The array would have been reversed.

 // The loop needs not get to the end of the array.

 // Hence, the loop ends halfway into the array i.e n/2.

 for (int k = 0; k < n / 2; k++) {

   

  // Swap first and last, second and next-to-the-last and so on

  temp = a[k];

  a[k] = a[n - k - 1];

  a[n - k - 1] = temp;

 }

Explanation:

Carefully go through the comments in the code.

Hope this helps!

In Windows 7, what button or icon do you click first to view the programs available on the computer?a. Programs
b. Start orb
c. Start menu
d. All Programs

Answers

It is c it is on the start menu

Answer:

the correct answer is start orb

Explanation:

you can enter the correct range in a function by typing the beginning and ending cell references separated by a _______?

Answers

comma? i'm not sure i understan the question... do you have an example

Colon (:) is the answer.

Several options are available on the drawing toolbar. Which option lets you create graphics from text?

Answers

The answer is WordArt.
WordArt is a feature or a tool found under 'drawing toolbar' which helps create graphics from a text. WordArt is available in Microsoft Office 2003 Applications. However, this tool is no longer available in Microsoft Office Applications version 2007 and higher.

A _______ is a three-terminal variable resistor that's often used to adjust motor speed.

Answers

A potentiometer is a three legged variable resistor use to contol motor speed or adjust the volumn of a music speaker or tone on a radio.