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]
2 years ago
5

Consider the following code segment.

Computers and Technology
1 answer:
antiseptic1488 [7]2 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
100 POINTS
agasfer [191]

Answer:

i'm just a kid ku ku ku ku ku ku ku ku ku ku ku ku

6 0
3 years ago
An administrative assistant types a document, saves, and prints. The assistant is using _____.
9966 [12]
The answer to your question is software. 
3 0
3 years ago
What should you do if a reporter asks you about potentially classified information on the web
Natasha_Volkova [10]

Answer:

Neither confirm nor deny the information is classified.

Explanation:

This action is taken because if you answer that the information is classified, more questions will arise about why it is classified thus leaving you in an awkward situation to respond (since it is classified by something).

In the event that you answer that it is not classified, it also gives rise to the reason that the information is not of simple access also exposing you to answering more questions and having to release the confidential information.

By denying both confidentiality and non-confidentiality, you refer to ignorance of the subject by avoiding further questions about such information on the web.

5 0
3 years ago
Overloading in methods are popular in programming, and why overloading is important.
Cerrena [4.2K]

Answer:

 Yes, overloading is one of the methods which are popular in programming language. Overloading basically refers to the same function but different signature called function overloading or method overloading. It is the ability to define the multiples method by using the single identifier.

The overloading is important because it has the ability to design the multiple method by using similar name. It also provide the high flexibility to the programmers to call the same method in the data. overloading basically provide the high clarity in the code.

Overloading is used to achieved the compile time polymorphism.  

Following are program of function overloading in c++ are:

Class abc // creating class

{

public:

int p;

void fun() // function fun with no parameter/

{

cout<<” hello “;

}

void fun(int a) // function fun with parameter

{

p=a;

cout<<p;

}

};

int main() // main function

{

abc ob; // creating object

ob.fun();// print hello;

ob.fun(6);// print 6

return 0;

}

Explanation:

In this program the function fun() have same name but different signature in the main method we create the object of class abc i.e ob. ob.fun() this statement called the function with no parameter and ob.fun(6) this statement will called the function with integer parameter.

5 0
3 years ago
Given that it takes 0.08 ms to travel from one track to the next of a hard drive; that the arm is originally positioned at Track
daser333 [38]

Answer:

Time taken to travel from one track to the next = 0.08ms

Initial track= 15     0

4      (15-4)*(0.08)= 0.88

40     (40-4)*(0.08)= 2.88

35      (40-35)*(0.08)= 0.4

11       (35-11)*(0.08)= 1.92

14       (14-11)*(0.08)= 0.24

7         (14-7)*(0.08)= 0.56

----------------------------------------------

Total seek time=0.88+2.88+0.4+1.92+0.24+0.56=6.88ms

Explanation:

We caculate the seek time for each request, and then add them together to find the total seek time. The final track number for the current request becomes the current track of next request, and this process is repeated till the last request is processed.

4 0
3 years ago
Other questions:
  • In java write a program:A contact list is a place where you can store a specific contact with other associated information such
    8·1 answer
  • EBay buyers voluntarily comment to other users and sellers on the quality of service, promptness of shipping, and their general
    5·1 answer
  • Consider the provided C++ code in the main.cpp file: The function func2 has three parameters of type int, int, and double, say a
    8·1 answer
  • Why does a HTML seen to work even when its broken? why does the code sometimes turn pink?
    9·1 answer
  • In the SQL environment, a _____________ is a logical group of database objects – such as tables and indexes – that are related t
    11·1 answer
  • According to the municipal solid waste report what are the benefits of recycling
    6·1 answer
  • Menus are attached to the windows by calling
    15·1 answer
  • Explain the reason why vector graphics are highly recommended for logo​
    5·1 answer
  • Imagine that you need to prepare for three end-of-term tests. What steps will you take to make sure your study time is well spen
    5·1 answer
  • 8. Choose the 3 correct statements for the code below.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!