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
Phantasy [73]
3 years ago
12

What set of code correctly initializes all elements of the array ar to the value 0, given the declaration

Computers and Technology
1 answer:
Veronika [31]3 years ago
7 0

Answer:

The correct answer is:

C. ndx = 0;

while (ndx < 3) {

ar[ndx] = 0;

ndx++;

}

Explanation:

The declaration given is:

int ar[3];

This means the array consists of three locations and is named as ar.

We know that the indexes are used to address the locations of an array and the index starts from 0 and goes upto to 1 less than the size of the array which means the indexes of array of 3 elements will start from 0 and end at 2.

Now in the given options we are using ndx variable to run the while loop.

So the code to assign zero to all elements of array will be

ndx = 0;

while(ndx<3)

{

ar[ndx] = 0;

ndx++;

}

Hence, the correct answer is:

C. ndx = 0;

while (ndx < 3) {

ar[ndx] = 0;

ndx++;

}

You might be interested in
Select all the correct answers.
oksian1 [2.3K]

Answer:

It's probably "facilitate discussions"

Hope this helps you!

Bye!

4 0
3 years ago
Read 2 more answers
Software designed specifically for managing real estate is an example of ________ software. Select one: A. e-commerce B. vertica
Mamont248 [21]

Answer:

The answer is "Option B"

Explanation:

In software designing vertical market is part of the market by which stores sell unique products or services for the industry, trade, export or any other specialized customer groups, this type of market, and the wrong option can be described as follows:

  • In option A, It is a software to collect business-related information.
  • In option C,  It is a condition that describes business risks.
  • In option D, It describes all the details about the software.

4 0
4 years ago
There used to be a popular type of pulp book for younger readers. They were called "Choose Your Own Adventure" novels. The idea
Vlad [161]

Answer:

click on the link

Explanation:

link is somewhere hidden

3 0
3 years ago
The ........ tag is used to create a link to another document​
Free_Kalibri [48]

Answer:

The "a" tag or <a></a> and its "h<u>r</u>ef" attribute <a href="#"></a>

Explanation:

In html there is only one way to create a link to an external source or a bookmark. The tag is created using the element <a>.

The attribute "href" is then added to describe the link of where it is to point to.

Example:

<a href="google.com">Go to Google</a>

While the text in between the tag describes what the link is about.

7 0
3 years ago
Write an if-else statement with multiple branches. If givenYear is 2101 or greater, print "Distant future" (without quotes). Els
kherson [118]

Answer:

// here is code in c.

#include <stdio.h>

// main function

int main()

{

// variable to store year

int year;

printf("enter year:");

// read the year

scanf("%d",&year);

// if year>=2101

if(year>=2101)

{

printf("Distant future");

}

//if year in 2001-2100

else if(year>=2001&&year<=2100)

{

   printf("21st century");

}

//if year in 19011-2000

else if(year>=1901&&year<=2000)

{

  printf("20th century");

}

// if year<=1900

else if(year<=1900)

{

  printf("Long ago");  

}

return 0;

}

Explanation:

Read the year from user.After this, check if year is greater or equal to 2101 then print "Distant future".If year is in between 2001-2100 then print "21st century".If year is in between 1901-2000 then print "20th century".Else if year is less or equal to 1900 then print "Long ago".

Output:

enter year:2018                                                                                                            

21st century

7 0
3 years ago
Read 2 more answers
Other questions:
  • The __________ endian storage format places the __________ byte of a word in the lowest memory address. The __________ endian st
    15·1 answer
  • Why might location be important when searching for a job?
    10·2 answers
  • I REALLY NEED HELP WITH THIS ASSIGNMENT. IT WOULD BE GREATLY APPRECIATED IF SOMEONE HELPED ME. I'M NOT GOOD AT COMPUTER SCIENCE
    6·2 answers
  • How to format an APA paper set it up
    15·1 answer
  • )duplicate hash code
    15·1 answer
  • The span was so long, the height so great, and the enterprise likely to be so costly, that few thought of it as something begun
    9·2 answers
  • प्रश्न-20 उचित स्थान पर विराम चिह्न लगाइए
    8·1 answer
  • Your development server is experiencing heavy load conditions. Upon investigating, you discover a single program using PID 9563
    5·1 answer
  • What are the fundamental activities that are common to all software processes?
    9·1 answer
  • 14 Copy a picture of a crane on the next page. Do not trace them. Make a freehand sketch. (2) 2 Look at the placed where the Mar
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!