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
What port number is the well-known port used by web servers to distribute web pages to web browsers?question 3 options:?
stira [4]
This is port 80 for clear-text connections and 443 for encrypted (TLS) connections.
5 0
3 years ago
 What should every Software Engineer know about Software Architecture? ”<br> ??
Llana [10]
<span>Answer: -Software architecture isn't about big design up front; -Every software team needs to consider software architecture; -The software architecture role is about coding, coaching and collaboration; -You don't need to use UML; -A good software architecture enables agility.</span>
7 0
3 years ago
Me pueden ayudar a hacer un proyecto de tecnología? mi fb es Erick Escaron (foto de perfil de free fire y dice veterano)
trapecia [35]

Answer:

tecnología? mi fb es Eri

8 0
3 years ago
After class, Anita and Bev make plans to study for their psychology exam together but cannot decide on a time or location. In ad
Paladinen [302]

Answer:

Option B; 30 SECONDS OR LESS.

Explanation:

Short-term memory, also known as primary or active memory, is the information we are currently aware of or thinking about.

When short-term memories are not rehearsed or actively maintained, they last mere seconds.

Most of the information kept in short-term memory will be stored for less than 30 seconds (approximately 20 to 30 seconds), but it can be just seconds if rehearsal or active maintenance of the information is not done.

Therefore, Anita likely will be able to retain the information in short-term memory, without additional processing, for 30 SECONDS OR LESS.

8 0
3 years ago
In a paragraph of no less than 125 words, explain what netiquette is and how it improves efficiency and productivity in the work
Pani-rosa [81]

Netiquette actually means "Internet etiquette." Just like etiquette is a code of polite behavior in society, netiquette is a code of good behavior on the Internet. This includes several aspects of the Internet, such as email, sending memos, or basic communication regarding office task.

Now we should note that communication is not just a pivotal part of any organization, it is an integral part of any organization, without communication, an organization will suffer greatly. Communication is said to be effective when the receiver understands the message conveyed just as the sender wanted to,  having said that Netiquette improves efficiency and productivity in the workplace because it creates an avenue for efficient communication which includes clear instructions, fast message delivery, and proper explanation, and this bridges the gap between managers and employees even when they are miles apart. A clear message about a task makes it easier to carry out the said task, thereby resulting in high productivity in the workplace.

7 0
3 years ago
Other questions:
  • A website wants to gives out detailed information to viewers about its upcoming conference and also provides a feature for searc
    10·1 answer
  • Earthquakes happen in the Earth’s
    10·1 answer
  • What is a popular use for SLR film cameras? (choose one)
    14·1 answer
  • ROM is designed for _________
    6·1 answer
  • A(n) ________ operator, such as the greater than or less than symbol, can be used in a query criterion to limits the results pro
    12·2 answers
  • How does an operating system manage peripheral devices?
    6·1 answer
  • It is important to know the terms of use of any website because why
    12·2 answers
  • Why do I keep getting points if I haven't answered anything? I don't want points.
    12·1 answer
  • One of 34 possible _________________ can be assigned to each axis of classification in the seven-character code.
    12·1 answer
  • Use the svd() function in matlab to compute a, the rank-1 approximation of a. clearly state what a, is, rounded to 4 decimal pla
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!