Consider the following code segment.
int[][] multi = new int[4][4];

for (int rows = 0; rows < 4; rows++)

{

for (int cols = 0; cols < 4; cols++)

{

if (cols == 0)

{

multi[rows][cols] = 0;

}

else if (cols == 1)

{

multi[rows][cols] = 1;

}

else if (cols == 2)

{

multi[rows][cols] = 2;

}

if ((rows % 2 == 0) && (cols % 2 == 0))

{

if ((rows >= 2) && (cols <= 2))

{

multi[rows][cols] = 9;

}

}

}

}

As a result of executing the code segment, how many elements in the two-dimensional (2D) array multi will store the value 9 ?


A) 0
B)1
C)2
D)4
E)6

Answers

Answer 1

Answer:

C

Explanation:

C.10 15 20 35

30 35 40 45

50 55 60 65

Answer 2

As a result of executing the code segment, 2 elements in the two-dimensional (2D) array multi will store the value 9. Thus, option C is correct.

How the elements in the array can be calculated?

Given the array

arr = {1,2,3,4,5}

To set the first two elements of array arr to 10.

Kindly note that ; index numbering if array elements starts from 0

First element of the array has an index of 0

2nd element of the array has an index of 1 and so on.

Array elements can be called one at a time using the array name followed by the index number of the array enclosed in square brackets.

arr[0] = 10 (this assigns a value of 10 to the index value, which replace 1

arr[1] = 10 (assigns a value of 10 to the 2nd value in arr, which replaces 2

Therefore, As a result of executing the code segment, 2 elements in the two-dimensional (2D) array multi will store the value 9. Thus, option C is correct.

Learn more about array on:

https://brainly.com/question/13107940

#SPJ2


Related Questions

Match each operating system drawback to its respective operating system.

1. more susceptible to viruses Linux. Operating System
2. fewer compatible applications Microsoft Windows Operating System
3. limited support system Apple Operating System

Answers

Answer:

Microsoft Windows - More susceptible to viruses

Linux - Limited support system

Apple - Fewer compatible applications

Explanation:

Generally windows is more susceptible to viruses.

Linux is open source meaning it's up to the community to help you.

Apple has been supporting more applications in these coming years but it still lacks the wide range of apps windows supports.

Answer:

1. Microsoft Windows is more susceptible to viruses

2. Mac OS X (Apple OS) has fewer compatible applications

3. Linux OS has a limited support system.

What are the characteristics of calendar sharing options in Outlook 2016? Check all that apply.
The most common thing to share in Outlook is the calendar.
The Publish Online option is for users outside an organization.
Changing calendar permissions only changes what a user can see.
Publishing a calendar online will allow anyone in the world to see it.
The Share option opens an email message that sends the calendar link.
O Calendar sharing options include Email, Share, Publish Online, and Delegate.

Answers

Answer:

The characteristics of calendar sharing options in Outlook 2016 are;

1) The most common thing to share in Outlook is the calendar

2)  The Publish Online option is for users outside an organization

4) Publishing a calendar online will allow anyone in the world to see it

5) The Share option opens an email message that sends the calendar link

6) Calendar sharing options include Email, Share, Publish Online, Delegate

Explanation:

1) Sharing is used mostly by a group of people working on a given project

Items commonly shared in Microsoft Outlook includes email Folders calendars and address books (contacts)

Therefore, for people working on a project together, the most common thing to share in Microsoft Outlook 2016 is the calendar

2) The Publish Online option allows a user to make a calendar available to people outside the organization

3) The calendar sharing permissions are;

a) Who can view the date and time marked as busy

b) Who can view the location and titles of appointments

c) Who can view all the calendar details

d) Who can edit

e) Who can delegate

Therefore, changes in calendar permissions does not only change what the user can see

4) When publishing a calendar, a special URL is created that can be shared to people outside of an organization

A published calendar can be viewed by everyone that has the calendar link

Therefore, publishing a calendar online will allow anyone in the world to see it

5) When a calendar is shared, the person with which the calendar is shared will receive an invitation email for the invitee to accept with an "Open this Calendar" button

Therefore, the Share option opens an email message that sends the calendar link

6) Calendar sharing options includes

a) Sharing the calendar within the organization

b) Publishing a calendar to the web to share the calendar

c) A calendar can be shared in an email

d) Authority can be delegated to a particular calendar

Therefore, calendar sharing options include Email, Share, Publish Online, Delegate

1, 2, 3, 5

just did it

PLEASE PLEASE HELP pleeeeeeeeeaaaase

Answers

Answer:

Truuuuuuueee

Explanation:

Plz give brainliest

Answer:

It's true

Explanation:

I just had the same question , ur welcome :)

9.5 Code Practice edhesive

Answers

Answer:

a = [[34,38,50,44,39],

    [42,36,40,43,44],

    [24,31,46,40,45],

    [43,47,35,31,26],

    [37,28,20,36,50]]

   

sum=0

for r in range(len(a)):

   for c in range(len(a[r])):

       sum = sum + a[r][c]

       

       

print("Sum of all values: " + str(sum) + "\n\n")

print("Average of all values: " + str(sum / (len(a) * len(a))))

Explanation:

I got 100%.

Answer:

a = [[34,38,50,44,39],

   [42,36,40,43,44],

   [24,31,46,40,45],

   [43,47,35,31,26],

   [37,28,20,36,50]]

   

sum=0

for r in range(len(a)):

  for c in range(len(a[r])):

      sum = sum + a[r][c]

       

       

print("Sum of all values: " + str(sum) + "\n\n")

print("Average of all values: " + str(sum / (len(a) * len(a))))

Explanation:

Sum of all values: 949

Average of all values: 37.96

About C header files of C programming

Answers

Answer:

A header file is a file with an extension. Which contains C function declarations and macro definitions to be shared between several source files. There are two types of header files: the files that the programmer writes and the files that come with your compiler.

What is the difference between electrical and electronic devices?

Answers

Answer:

A difference is that the electrical devices makes the electrical energy into the other forms of energies, such as heat, light, sound, gravitational, and nuclear. . . The electronic device controls the flow of electrons for performing the task.

Answer:

the different between electrical and electronics devices is the electricity and the power of inside of some devices which are considered most powerful electronics from, because the difference is the battery.

Explanation:

i hope it helps ;)

PLEASE HELP !!!!!!!!!!!!!
What is revising?

Answers

Answer:

Revision literally means to “see again,” to look at something from a fresh, critical perspective. It is an ongoing process of rethinking the paper: reconsidering your arguments, reviewing your evidence, refining your purpose, reorganizing your presentation, reviving stale prose.

Which of the following are considerations in e-commerce and e-government Internet sites? Check all of the boxes that apply.

security

what time of day you are online

protection of sensitive information

from which location you are accessing the site

Answers

Answer:

protection of sensitive information

Explanation:

Answer:

a c baka baddies

Explanation:

What is the difference between a patent and a copyright?
A copyright protects inventions, a patent protects intellectual property.

B copyright protects intellectual property; a patent protects inventions.

C Copyrights are for music, and patents are for books.

D Patents are for books, and copyrights are for music.

Answers

Answer:b

Explanation:

The difference between a patent and a copyright is,

B) Copyright protects intellectual property; a patent protects inventions.

Given that,

To find the difference between a patent and a copyright.

We know that,

Copyrights primarily safeguard original works of authorship, such as literary, artistic, musical, or dramatic creations.

On the other hand, patents are granted to inventors to protect new and useful processes, machines, compositions of matter, or any new and inventive improvement thereof.

So, copyrights are more about creative expressions, like music and books, while patents are focused on protecting unique and innovative inventions.

Option B is true.

To learn more about copyright visit:

https://brainly.com/question/357686

#SPJ4

How is a high-level programming language compiled? (5 points)
O a
A binary interpreter is used to translate each line of code.

All lines of code are translated together and then executed at once.
ос
One line of code is translated and then executed before moving to the next line.
d
Six lines of code are translated and then executed before moving to the next set of six.

Answers

Answer:

A high-level language is a programming language that uses English and mathematical symbols in its instructions. To execute a program in a high-level language, it can be compiled or interpreted. A compiler translates the entire program written in a high-level language to machine language prior to execution. After the compiler translates the code into machine language, it is typically executed line-by-line.

Explanation:

Answer:

One line of code is translated and then executed before moving to the next line.

Write a pseudocode algorithm that ask a user to enter three numbers. The program should calculate and print their average

Answers

Answer:

BEGIN

INPUT first_number, second_number, third_number

average = (first_number + second_number + third number)/ 3

PRINT average

END

Explanation:

That is the simplest answer one can create

In python please!! Write the definition of a function named countPos that needs integer values from standard input until there are none left and returns the number that are positive. The function must not use a loop of any kind.

Answers

Answer:

Explanation:

The following code is written in Python it doesn't use any loops, instead it uses a recursive function in order to continue asking the user for the inputs and count the number of positive values. If anything other than a number is passed it automatically ends the program.

def countPos(number=input("Enter number: "), counter=0):

   try:

       number = int(number)

       if number > 0:

           counter += 1

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

       else:

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

   except:

       print(counter)

       print("Program Finished")

countPos()

PLZZZ HELP
Escaping Literal Quotes in Strings (JavaScript)
first pic is instructions
second pic is the code I have
Also, please provide feedback on the code I have.
WILL GIVE BRAINLIEST'
WILL REPORT ALL SCAMS

Answers

Answer:

If you just want to escape string literals, here are the ways to do it. There are at least three ways to create a string literal in Javascript - using single quotes, double quotes, or the backtick (). So, if you enclose your string in single quotes, no need to escape double quotes and vis versa.

Explanation:

Write a program that asks the user for the name of a file. The program should display the contents of the file with each line preceded with a line number followed by a colon. The line numbering should start at 1. (You can create a file and populate it with some data, then run your program to open that file and display the contents line by line with the number of the line preceding the line data)

Answers

Answer:

Explanation:

The following program is written in Python. It asks the user for the file name (which needs to be in the same directory as the program) and reads the file. It then splits it by lines and saves it into an array. Then it loops through the array, printing each line with its corresponding line number.

file_name = input("File Name: ")

f = open(file_name, 'r')

lines = f.read().split('\n')

for line in lines:

   print(str(lines.index(line) + 1) + ': ' + line)

ANSWER ALL QUESTIONS CORRECTLY PLEASE AND YOU WILL GET A BRAINLIEST AND 10+ POINTS!!!! I WOULD REALLY APPRECIATE IT

Through the use of ICT and emerging technology in todays world, a number of sectors have been affected (whether in a positive or negative way). Three sectors in which ICT has had an impact are the health care, education, and banking sector.
Define the term ICT?

List three ICT tools that are commonly used in the education system?


Identify two ways in which ICT has impacted the education sector?

Answers

Answer: uhm can u explain what ICT is so i can understand the questions pls when i whould gladly help :)

Explanation:

PLEASE ANSWER ALL QUESTIONS CORRECTLY FOR 50 POINTS AND A BRAINLIEST!!!! IT ALSO INCLUDES ENGLISH, PLEASE KEEP IN MIND THIS IS ALSO IMPORTANT JUST AS THE OTHERS (NO SPAMMING OR LINKS)
Which stage of the problem-solving process involves identifying the inputs, process, and output for each solution? *

Definition of the problem
Develop the algorithm
Propose and evaluate possible solutions
Determine the most efficient solution.

Software used for professional print publications such as posters, books, and email newsletters is called a: *

Professional software
Word processing software
Desktop program
Desktop publishing software

Which of the following criteria does NOT determine the credibility of a source? *

How current the information is
The reputation the publisher
The article covers (speaks about) the topic being researched
The gender of the author

The process of finding a solution to a difficult or complex issue to make it easier is known as *

problem
problem-solving
input

A series of actions taken in order to solve a particular problem is known as the____________ *

process
problem
input
output

A finite set of unambiguous (no uncertainty, clear) instructions that can be performed in a prescribed sequence to achieve a certain goal is called a/an *

problem
output
algorithm
input

Which is the third step in the problem-solving process? *

Propose possible solutions
Test and evaluate the solution
Select the most effective solution
Defining the problem

A list of sources you used when writing a scholarly article on a specific subject is known as a: *

intellectual-property
credibility
bibliography
trademark

Which of the following are you able to create with the use of desktop publishing software? *
1 point
E-Book
Banner
All of the above
Newsletter

Which of the following is NOT a writing style format for academic purposes? *

Times New Roman
American Psychological Association
Modern Language Association

The right by an individual to protect his/her literary work such as poems, songs, and drawing is known as *

plagiarism
copyright
industrial property
trademark
Through the use of technology we can easily: *

SELECT ALL THAT APPLY. HINT: ONLY TWO OF THE 4 ARE CORRECT.

say more traditional jobs being available
agree that there are fewer emerging jobs
sell goods and services as we’ve never been able to
produce more jobs which will create growth and development in the country.

Answers

Answer: 1 Definition of the problem

        2 Desktop publishing software

        3 The gender of the author

4 problem-solving

5 input

6 algorithm

7 Select the most effective solution

8 credibility

9 All of the above

10 American Psychological Association

11 copyright

12 agree that there are fewer emerging jobs

sell goods and services as we’ve never been able to

Explanation:

Write a JavaScript program to create a multiplication table for numbers 1 to 12 using a while loop. I’ll mark brainliest, thanks

Answers

Answer:

</p><p>

</p><p>days1(); // calling function days1()

</p><p>

</p><p>function  days1() // function days1

</p><p>

</p><p>{

</p><p>

</p><p>var  week = ["sunday ", "monday ", "tuesday "," wednesday"," thursday",

</p><p>

</p><p>"friday"," saturday"];

</p><p>

</p><p>var i;

</p><p>

</p><p>for (i=0;i<7;i++)  // iterating over the loop

</p><p>

</p><p>{  

</p><p>

</p><p>document.write(" The number of days in a week :" +</br>);

</p><p>

</p><p>document.write( week[i] + "</br>" );  // print the number of days

</p><p>

</p><p>}

</p><p>

</p><p>}

</p><p>

</p><p>

Output:

The number of days in a week :

sunday

monday

tuesday

wednesday

thursday

friday

saturday

Explanation:

In this program, we create a function days1().In this function, we declared an array i.e "  week " which will store the list of the days of the week. After that, we iterate the for loop and prints a list of the days of the week.

Which of the two previously described wing designs should result in a longer flying time?

Answers

Answer:

If it's a bird than the bigger the wing span the faster it can fly... or possibly glide in the air longer. I think all plan wing sizes don't change the effect of how it goes. If it is something like the sky gliders than yes. It would most likely be in the sky longer.

what is a flowchart and write it's work​

Answers

Answer: A flowchart is a type of diagram that represents an algorithm, workflow or process. The flowchart shows the steps as boxes of various kinds, and their order by connecting the boxes with arrows. ... Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields.

Explanation: brainliest plz!

how important the role of valet and butler service in the hospitality

Answers

very important bc they help you with what you need.

What is Polymorphism in programming? Explain in your own words with examples.

Answers

Answer:

A computer program which can change on it's own, such as a polymorphic virus that is harder to detect. It can change it's own code to achieve the same goal but have a different structure.

Explanation:

Answer:

Polymorphism is a feature of object-oriented

programming languages that allows a specific routine to use variables of different types at different times. Polymorphism is the ability of a programming language to present the same interface for several different underlying data types.

Explanation:

hope it helps

1) The Output of a computer can be seen on
b) Mouse
a) Monitor
c) Keyboard​

Answers

Answer:

Explanation:

Option B monitor is the correct answer

Answer:

ans is a

hello

myself swapna

 Someone plzzz help !
Can you use 2 wireless keyboards and 2 wireless mouse on a dual monitor desktop without interfering with the other monitor ?

Answers

Answer:

Good luck

Explanation:

You might find a software but normally you'd need two different OS's but it might be possible if you go under mouse and keyboard settings but it's highly unlikely you'll find what you're looking for there

hi please help ASAP it's about html!​

Answers

Given :-

Create a HTML code for writing a web page for your school time-table.

Answer :-

<html>

<head>

<title> Time Table </title>

</head>

<hrcolor = "red">

<hrcolor = "blue">

<body>

<table><tr = "7"><md = "7"><Period 1_></table>

</body>

</html>

[tex] \\ [/tex]

Answered by - ItzMaster

A DTP firm has published and printed fliers for an upcoming fundraising event. In which section of the flyer would you find the contact details of the DTP firm
A. Body
B. Credits
C. Navigation
D. Title

Answers

B.Credits at the end of the flyer

When did computer networking go beyond the walls of the firm?

Answers

Answer:

All kinds of computing devices such as tablets, PCs, or laptops feature a brain-like unit called the central processing unit or CPU. Your computer's CPU calculates and interprets instructions while you're surfing the web, creating documents, playing games, or running software programs.

Explanation:

We cannot imagine a life without the Internet. Imagine that you had to live without being connected to the Internet. Discuss the challenges you would face in such a scenario.

Answers

Answer:

Explanation:

Everything runs on the internet nowadays. Living without internet would bring many challenges. One of which would be difficulty making purchases. It is not always easy to find what you need close by which is why the majority of commerce nowadays is done through the internet. Another difficulty would be the lack of information, not being able to quickly search for something. Lastly, and probably the most important is the lack of communication. Without internet, you would lose contact with many loved ones around the world and would be limited to telephone communication.

Arranging a given set of data in ascending or descending order is ...................​

Answers

Explanation:

maybe it's answer is sorting

Examine the weather map.

A weather map of the United notes. The following are shown on the map: major cities with high and low temperatures; high and low pressure systems; types of precipitation, fronts.

Which weather forecast would be accurate based on this weather map?

Rain is expected in Billings.
It will be cold in Atlanta.
Miami will have sunny weather.
Minneapolis will be stormy.

Answers

Answer:

A. Rain is expected in Billings.

Explanation:

Rain is expected in Billings would be accurate based on this weather map.

What is Weather map?

A weather map is a map of the world or a portion of it that uses symbols to depict the weather conditions at a given time, including temperature, pressure, wind speed and direction, humidity, clouds, visibility, and type and amount of precipitation.

The trained observers record the temperature, pressure, wind speed and direction, cloud cover, and precipitation amounts in observatories and meteorological stations. Using symbols, these observations are entered on a weather map. '

'

As a result, a weather map shows the weather factors for a region at a specific time that are denoted with recorded symbols. It makes the current weather conditions clear.

Therefore, Rain is expected in Billings would be accurate based on this weather map.

To learn more about weather map, refer to the link:

https://brainly.com/question/1674348

#SPJ3

Which pieces of information does the National Weather Service produce?

simple maps
newspaper maps
long-range forecasts
maps with isothermsHow are computers used in producing weather forecasts?

They compile data from multiple instruments.
They collect air temperature and air pressure data.
They eliminate the need for human meteorologists.
They transmit data on developing weather systems from space.

Answers

Answer:

1. maps with isotherms

2. They compile data from multiple instruments.

Explanation:

The pieces of information that the National Weather Service produces are "maps with isotherms". These pieces of information depict the range of temperature and pressure occurring on the surface of the earth. Thereby providing a weather forecast that predicts the future occurrence of climate changes, which is then used to protect and enhance the lives of Americans.

Computers " compile data from multiple instruments" in producing weather forecasts. Instruments such as anemometer, wind vane, pressure sensor, thermometer, hygrometer, and rain gauge. The computer then uses specific mathematical equations to predict the weather or climate change.

Other Questions
in spanish to emphasize that you really like something you say PLEASE HELP ASAP . PLEASE There is a bag of marbles that contain 5 blue, 6 red, 3 black, and 2 yellow marbles. What is the probability that you select a blue or a red marble Sorry kind of going to ask a lot today....Which statement about women's suffrage movement of the 1800's and early 1900's is correct? A. It was lend by conservative male politicians who believed women would vote for themB. It was lend by a growing number of well-educated and well-to-do womenC. It was led by industrialist who supported women's demand for full political equality D. It was lend by women in the labor force, especially factory and domestic servants The part of speech helps determine ~how to use a word ~the job of the word in a sentence ~what the author meant ~the purpose of the writingPlease help Of the possible outcomes in the sample space, how many times does the event of rolling a two occur? 2) __________ are chemical messengers produced by the endocrine system and released into the bloodstream.BRAINLIEST!NO FILE HOSTING LINKS!!! pls help me out what up Jacob made a banner for a sporting event in the shape of a parallelogram. The area of the banner is 127 1/2 square centimeters. The height of the banner is 4 1/4 centimeters. What is the base of the banner?PLS HELP PLS PLS Put the poem how to eat a poem into a summary in your own words Solve for X, show work PLS =)(4x+2)=2x-4 What type of claim is the author making?A. value claimB. fact claimC. policy claimD. cause claim Which best describes a difference between the Minoan and Mycenaean societies a.Minoans were monotheistic b.Minoans were strong fighters c.Minoans were better artists d.Minoans were not interested in trade Find the volume of a sphere with a radius of 5 in. Round to the nearest hundredth.A) 53.05 in3 B) 104.72 in3 C) 392.70 in3 D) 523.60 in3 _______________is the career cluster that medical professionals are under. help appreciated :).The byzantine empire was Christian. Explain this and how it relates to Byzantine art. 11. All of the following have contributed to an increase in presidential power in thepost-1945 era EXCEPT *A. tensions between the United States and the Soviet Union during the Cold WarperiodB. an increase in public expectations for services from the federal governmentC. economic and domestic problems such as inflation, unemployment, and civil rightsissuesD. increasing United States involvement in international affairsE. legislation granting the President the power to impound funds appropriated byCongress Describe the forces that are acting on a person who is standing still on a sidewalk, and identify whether the forces are balanced or unbalanced. Describe how the forces would change if the person started walking. THIS IS OFF-TOPIC BUT LIKEI watched an add, it still didn't work- HELP ASAP Which phrase is an example of a procedure document?A. a description of what employees must wear in the workplaceB. a description of actions to take to hire an employeeC. a description of standards for daily patient care at a hospitalD. a description of how staff should greet customers at a storeE. a description of acceptable ways to use social media at work