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
borishaifa [10]
3 years ago
15

Consider the following code segment, which is intended to create and initialize the two-dimensional (2D) integer array num so th

at columns with an even index will contain only even integers and columns with an odd index will contain only odd integers.
int[][] num = /* missing code */;
Which of the following initializer lists could replace /* missing code */ so that the code segment will work as intended?
A. {{0, 1, 2}, {4, 5, 6}, {8, 3, 6}}
B. {{1, 2, 3}, {3, 4, 5}, {5, 6, 7}}
C. {{1, 3, 5}, {2, 4, 6}, {3, 5, 7}}
D. {{2, 1, 4}, {5, 2, 3}, {2, 7, 6}}
E. {{2, 4, 6}, {1, 3, 5}, {6, 4, 2}}
Computers and Technology
2 answers:
butalik [34]3 years ago
7 0

Answer:

A. {{0, 1, 2}, {4, 5, 6}, {8, 3, 6}}

Explanation:

From the options, we can see that the array is a 3 by 3 array and the array index (whether row or column) begins at 0.

So, the column index for this array is 0, 1 and 2.

Column number 0 and 2 will be treated as the even column while column number 1 will be treated as the odd columns.

<em>Of all options (a) to (e), option (a) fits the requirement of the question; hence; (a) answers the question.</em>

Masja [62]3 years ago
7 0

Answer:

A

Explanation:

because the index is even

You might be interested in
Special instruments can be attached to a telescope's _______________to enable astronomers to enhance by brightening or enlarging
Arte-miy333 [17]
I think it is D. eyepiece because what I know we can put a camera to the eyepiece
7 0
4 years ago
Num = int(input("Enter a number: "))
Pavlova-9 [17]

So, 5 is intered.

Line 1: num will recieve the integer 5

Line 2: Blank

Line 3: num will recieve 1, wich is the remainer of the division of 5 by 4.

Line 4: will return true, since num is indeed equal to 1.

Line 5: Will print "A"

Line 6: Will return false

Line 7: Gets jumped

Line 8: Will return false

Line 9: Gets jumped

Line 10: Will return false

Line 11: Gets jumped

Line 12: Will return false

Line 13: Gets jumped

The only OUTPUT is "A".

5 0
3 years ago
To narrow the search for consumers, search engines used to measure the relevance of a website or an information page by counting
noname [10]
The answer is : it was easily manipulated.   To narrow the search for consumers, search engines used to measure the relevance of a website or an information page by counting the number of times the searched words appeared on that web page or document.  They don't use this criterion anymore because it was easily manipulated.
5 0
3 years ago
Use the table and the drop-down menus to order the
White raven [17]

Answer: 2, 6, 3, 4, 7

Explanation:

4 0
3 years ago
Read 2 more answers
Whats the flow in this code, and whats the risk that its creating and what can i do to fix it? (c language)
Advocard [28]

Answer:

The risk is a buffer overflow.

Explanation:

Whatever the user passes as a command line argument, will be copied into the buffer. If the user passes more than 499 characters, the end of the buffer will be overwritten.

To solve it, compare the string length of argv[1] to 500 before copying, or even better, start using the new strcpy_s( ) function.

6 0
3 years ago
Other questions:
  • The two types of one-time-password tokens are ______ and ______.
    10·2 answers
  • This software system shall consist of four source files (.cpp) and four header files (.h) defining four classes. The first class
    6·1 answer
  • 5 provisions of computer ethics
    6·1 answer
  • Write a program that will use user input. The program should be called PrintNumberToWordie which prints "ONE", "TWO",..., "FIVE"
    9·1 answer
  • Does anyone know what happened to Cole Morgen, the actor?
    11·1 answer
  • Which of the selection below does not represent a workable IP address?
    9·1 answer
  • Write a simple hello world program in python 3
    8·2 answers
  • JPG is considered a lossy file format. What does this mean?
    15·2 answers
  • Write a C program to find the sum of 10 non-negative numbers entered by user​
    14·1 answer
  • Polynomial regression A common misconception is that linear regression can only be used to fit a linear relationship. We can fit
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!