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
gregori [183]
3 years ago
5

Consider the following code segment.

Computers and Technology
1 answer:
antiseptic1488 [7]3 years ago
6 0

Answer:

C. "Condition one" is printed once, and "Condition two" is printed twice.

Explanation:

Given

The above code segment

Required

The number of times each\ print\ statement is executed

For "Condition one" to be printed, the following conditions must be true:

if (col > 0) ---- the column must be greater than 0 i.e. column 1 and 2

if (arr[row][col] >= arr[row][col - 1]) --- the current element must be greater than the element in the previous column

Through the iteration of the array, the condition is met just once. When

row = 1  and   col = 2

arr[1][2] > arr[1][2-1]

arr[1][2] > arr[1][1]

4 > 3

For "Condition two" to be printed, the following condition must be true:

if (arr[row][col] % 2 == 0) ----array element must be even

Through the iteration of the array, the condition is met twice. When

row = 0  and   col = 1

row = 1  and   col = 0

arr[0][1] = 2

arr[1][0] = 4

You might be interested in
What is the best free game designing program for windows
Nadusha1986 [10]
Python, Unity 3D, C++Notepad
8 0
3 years ago
What determines the speed at which your computer performs tasks?
Arturiano [62]
The CPU is probably the most common
4 0
3 years ago
Read 2 more answers
What is Malware? Discuss this topic and give 3 examples of Malware AS WELL AS a description of how they cause damage to computer
Papessa [141]

Answer:

Definition:

Malware refers to the malicious electronic instructions ( programmes ) which copy and store themselves on the memory of the computer which destroys and halts the working condition of the computer.

Examples:

<em>→</em><em> </em><em>Trojanic</em><em> </em><em>bomb</em><em>.</em>

<em>→</em><em> </em><em>Memory</em><em> </em><em>bomb</em><em>.</em>

<em>→</em><em> </em><em>Polymorphic</em><em> </em><em>bomb</em><em>.</em>

5 0
3 years ago
________ are viruses that masquerade as useful programs or files. hydras spyware programs worms adware programs trojan horses
Harrizon [31]
Trojan horse is the correct answer
5 0
3 years ago
The table button is present in the ……… tab.​
amm1812

Answer:

Insert

Explanation:

The table button is present in the <u>Insert</u> tab.​

Refer to screenshot (MS Word)

Insert → Table → Insert Table or Draw Table

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which program has an indexed version of the NIST NSRL of MD5 hashes that can be imported to enhance searching for and eliminatin
    10·1 answer
  • A power supply unit for a computer converts:
    7·1 answer
  • How can I crack a computer password?
    10·1 answer
  • Write a program to sort an array of 100,000 random elements using quicksort as follows: Sort the arrays using pivot as the middl
    14·2 answers
  • Write two statements to get input values into birthMonth and birthYear. Then write a statement to output the month, a slash, and
    5·1 answer
  • If you can name this you get 15 points: ↑↑↓↓←→←→βα
    10·1 answer
  • Hey plz help, and thanks
    12·2 answers
  • How to do the for loop in python
    12·1 answer
  • Match the components of a blog to their descriptions.
    11·1 answer
  • What type pf physical security devices lets a company locate devices that have been moved to a new location?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!