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
Nataly_w [17]
3 years ago
8

Consider the following code segment, where num is an integer variable.int[][] arr = {{11, 13, 14 ,15},{12, 18, 17, 26},{13, 21,

26, 29},{14, 17, 22, 28}};for (int j = 0; j < arr.length; j++){for (int k = 0; k < arr[0].length; k++){if (arr[j][k] == num){System.out.print(j + k + arr[j][k] + " ");}}}What is printed when num has the value 14 ?
a. 14 14
b. 18 19
c. 16 17
d. 17 16
e. 19 181/1
Computers and Technology
1 answer:
Setler79 [48]3 years ago
6 0

Answer:

c. 16 17

Explanation:

Given

num = 14

The above code segment

Required

The output

In the code segment, we have the following iterations:

for (int j = 0; j < arr.length; j++) and for (int k = 0; k < arr[0].length; k++)

The above iterates through all the elements of the array.

The if condition is true, only on two occasions

(i) When i = 0; j = 2

(ii) When i = 3; j = 0

i.e.

arr[0][2] = 14

arr[3[0] = 14

So, the result of the print statement is: j + k + arr[j][k]

(i) When i = 0; j = 2

j + k + arr[j][k]  = 0 + 2 + 14 = 16

(ii) When i = 3; j = 0

j + k + arr[j][k]  = 3 + 0 + 14 = 17

<em>Hence, (c) 16 17 is true</em>

You might be interested in
Wanda wants to find some basic information about her computer, for example, what operating system and how much RAM are installed
Gnoma [55]

Answer:

Its very simple you just need to go on your desktop there right click on Computer/This PC icon and then click on properties. Here you can have all the basic information of the PC including OS version processor and RAM.

6 0
3 years ago
True or False. Over the past few years, the hacking community has engaged in more "lone wolf" types of hacking activities as opp
Bingel [31]

Answer:

False

Explanation:

Hackers usually perform their attacks in teams, the idea of a lone wolf hacker (single hacker) executing an attack isn't frequent, they work together and have their team names and they are known for their various attacks done for various reasons, reason can be political, business, competition, and so on.

8 0
3 years ago
Can someone write an essay on data storage and describe the different storages I have listed below•
Jobisdone [24]

Answer:

Explanation:

Punch card is the oldest computer storage; followed by tape and then floppy disk. Hard drive goes back as far as floppy but is still in use today. CD/DVD/BR discs are all later storage but are also used for storing music and videos. USB flash, SD card, SSD and cloud storage are the common technologies used today for data storage.

4 0
3 years ago
Read 2 more answers
9,105,?,161,?,241,257,?,401​
almond37 [142]
What is the question……..
4 0
3 years ago
Read 2 more answers
TCP connections are established through sequence numbers. Someone can guess a client's next sequence number and then impersonate
solong [7]

Options: True or false

Answer: True

Explanation:TCP(TRANSMISSION CONTROL PROTOCOL) is is an internet control protocol that allows Communication between internet users or computers by collecting and compiling packets of data and then sending such collected packets of data to the desired user.

Before using a TCP one must first create a connection which will enable it to effectively communicate with the other user.

TCP are established using sequence numbers which can be predicted by another party for their own personal gain.

6 0
3 years ago
Other questions:
  • "Which hash algorithm's primary design feature is two different and independent parallel chains of computation, the results of w
    9·1 answer
  • Bit rate is a measure of how many bits of data are transmitted per second. Compared to videos with a higher bit rate, the same v
    13·1 answer
  • Which naming scheme identifies the columns of a worksheet?
    12·1 answer
  • How long after you install a new toilet until you can use it?
    15·1 answer
  • What are the importance of switches in our electron device
    15·1 answer
  • Boardman College maintains two files—one for Sociology majors and another for Anthropology majors. Each file contains students'
    5·1 answer
  • 1. What does MS-DOS use for input?
    5·1 answer
  • g The state of Massachusetts at one time had considered generating electric power by harvesting energy crops and burning them. A
    15·1 answer
  • What are the most positive and the most negative decimal numbers that can be represented by a 2C (n+k) bit fixed-point number, w
    12·1 answer
  • Which model represents any process in general?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!