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
vlabodo [156]
3 years ago
12

C - Language Write three statements to print the first three elements of array runTimes. Follow each statement with a newline. E

x: If runTimes[5] = {800, 775, 790, 805, 808}, print: 800 775 790#include int main(void) {const int NUM_ELEMENTS = 5;int runTimes[NUM_ELEMENTS];int i;for (i = 0; i < NUM_ELEMENTS; ++i) {scanf("%d", &(runTimes[i])); }/* Your solution goes here */
return 0;}
Computers and Technology
1 answer:
Jobisdone [24]3 years ago
8 0

Answer:

Replace

/* Your solution goes here */

with

printf("%d",runTimes[0]);

printf("%d",runTimes[1]);

printf("%d",runTimes[2]);

Explanation:

The question requires that the first three elements of array runTimes be printed;

The first three elements are the elements at the first, second and third positions.

It should be noted the index of an array starts at 0;

  • So, the first element has 0 as its index
  • The second has 1 as its index
  • The third has 2 as its index

So, to make reference to the first three elements, we make use of

<em>runTimes[0], runTimes[1] and runTimes[2]</em> respectively

Having mention the above;

It should also be noted that array is of type integers;

So, to display integers in C, we make use of "%d";

Hence, the print statement for the first three elements is

printf("%d",runTimes[0]);

printf("%d",runTimes[1]);

printf("%d",runTimes[2]);

You might be interested in
What function does an extranet perform?
dsp73

Answer:

An extranet is a private network that uses Internet technology and the public telecommunication system to securely share part of a business's information or operations with suppliers, vendors, partners, customers, or other businesses.

6 0
3 years ago
A __________ is a combination of software and hardware that links two different types of networks.
timurjin [86]
A computer system is a combination of software and hardware that links two different types of networks
5 0
3 years ago
The picture above is a description of the C code below. Please modify the C below so that it uses FILE HANDLING (fopen, fputs, f
siniylev [52]

Answer: i just learned something new.

Explanation:

3 0
3 years ago
Taking multiple cells in a spreadsheet and combining them into one large cell is referred to as
lyudmila [28]
Cell merging or just merging
6 0
3 years ago
Read 2 more answers
What does VERONIcA stand for?
kompoz [17]
Very Easy Rodent-Oriented Netwide Index to Computerized Archives
5 0
4 years ago
Read 2 more answers
Other questions:
  • A proactive computer professional will _____. have a neutral outlook toward technology underestimate the impact of technology an
    13·2 answers
  • Array is special variable that can handle more than one value.
    6·1 answer
  • What is an internt?​
    10·1 answer
  • To use the AutoCalculate area, select the range of cells containing the numbers for a calculation you want to verify and then pr
    6·1 answer
  • Gta? 5 or gta 4? orrrr gta 3? what do you think?
    11·2 answers
  • Short Questions: a) What is website? How can we browse internet using website?​
    9·1 answer
  • What is processing unit?​
    7·2 answers
  • Explain the different type of shift register counter ​
    14·1 answer
  • PLSS HELP ASAP ILL GIVE BRAINLIEST THANKS
    11·1 answer
  • You can use the ____ method to search a string to determine whether it contains a specific sequence of characters.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!