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 are an administrator's choices for managing file permissions on a drive formatted as fat32?
Alexeev081 [22]
<span>If the drive is a network share, then Share permissions can be used.</span>
6 0
3 years ago
Which statement regarding socializers is true?
allochka39001 [22]

Answer:

The answer is: they are comparable to suit of hearts

Explanation:

The answer is: they are comparable to suit of hearts

7 0
3 years ago
Read 2 more answers
Playstation 4 how to change mtu settings
tamaranim1 [39]
Ask google mam.............
4 0
3 years ago
Gathering information with your eyes is called
Ivahew [28]
Observing, Looking, Collecting, there are a few words for "gathering information with your eyes". 
4 0
3 years ago
Read 2 more answers
Which of the following savings vehicles usually requires a high minimum balance
GuDViN [60]
A Savings Vehicle is an effective way to hold your savings. It could be a savings account. But some requires a high minimum balance such as Certificate of Deposit (CD). It is generally issued by commercial banks.  It is a time deposit too and restricts you from withdrawing funds.
7 0
3 years ago
Other questions:
  • Exit network systems, information support, and software development are all careers in which career cluster?
    10·1 answer
  • Which function can you use to abbreviate the lengthy expression, A1+A2+A3+A3...+A19+A20?  MAX COUNT SUM ROUND
    10·2 answers
  • You are preparing to program a replacement system board, but the "system is booting in mpm mode" message is not displayed. what
    10·2 answers
  • A hub or ____ is a central point that connects several devices in a network together.
    11·1 answer
  • FTP requires confirmation that a file was successfully transmitted to a client, but it has no built-in mechanism to track this i
    7·2 answers
  • How we know that how many domain exist in window server 2012?
    14·1 answer
  • Jim is writing a program to calculate the wages of workers in a teddy bear factory.
    7·1 answer
  • What is first page of website called​
    10·1 answer
  • Write a program that will remove "May" from the list using .Pop and .Index methods.(5pts) GIVEN: lst=["January", "February", "Ma
    15·1 answer
  • Can anyone figure this out???? I need help ASAP!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!