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]
2 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]2 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
Kim is writing a sql query that will pull a list of customers with outstanding orders and the sales rep for each order. What sho
Step2247 [10]

What the phrase should say in Kim's SQL Query is;  WHERE Customer = Sales Rep

<h3>What is SQL Query?</h3>

Structured Query Language (SQL) is defined as a standardized programming language that is used to manage relational databases and perform various operations on the data in them.

Now in SQL Query, when one SQL query is embedded in another SQL query to simulate a join, the second SQL query is embedded in the "WHERE" of the first query.

Since the query will pull a list of customers with outstanding orders and the sales rep for each order. Then, the where phrase will be;

WHERE Customer = Sales Rep

Read more about SQL Query at; brainly.com/question/10097523

6 0
2 years ago
Question 16 (2 points) Question 16 Unsaved
strojnjashka [21]
I will help with as many as I can! :)
-
16. Slogans
17. Website Design and Development Process
18. Planning
19. (This question is the same as question 18 so I am at a loss here, sorry)
20. Confuse users, believing it is a hyperlink.

I apologize for the wait. I was trying to double check my sources. Also, I apologize in advance if something is wrong.
3 0
3 years ago
Of the key reasons for creating organizational units which of the following is not one of them?
victus00 [196]
There are no answrt choices it would be very helpful if you added them, then I could help you.
5 0
2 years ago
Any anime weebs wanna talk
erastova [34]

Answer:

Sowwy, it's not Me!

The Bermuda Triangle, also known as the Devil's Triangle, is a loosely defined region in the western part of the North Atlantic Ocean where a number of aircraft and ships are said to have disappeared under mysterious circumstances. Most reputable sources dismiss the idea that there is any mystery.[1][2][3]

Bermuda Triangle

Devil's Triangle

6 0
2 years ago
Read 2 more answers
What is operating system​
iren [92.7K]

Answer:

It's simply a software that runs a computer's basic tasks, or functions, such as scheduling, running applications, and controlling peripherals.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Nathan wants to create multiple worksheet containing common formatting styles for his team members. Which file extension helps h
    5·1 answer
  • The concept of ____ refers to the idea that the internet is designed for all content to be treated equally.
    12·1 answer
  • Which is an example of an input device?
    15·2 answers
  • ? Question
    6·2 answers
  • Write a program to read a list of exam scores given as integer percentages in the range O to 100. Display the total number of gr
    11·1 answer
  • How do you know where the home row of the keyboard is?
    14·2 answers
  • ¡Hola! He visto en muchos comentarios de Twitter "svd" cuando alguien dice "dale fav a este Tweet y siganse entre ustedes" y en
    8·1 answer
  • What is also known as computer Network?
    6·2 answers
  • Product of -6/13 and reciprocal of -7/16 is ____________​
    7·1 answer
  • Which option on the Format tab is used to modify particular portions of the chart?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!