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
fgiga [73]
2 years ago
12

Int [] val = { 3, 10, 44 };

Computers and Technology
1 answer:
irina1246 [14]2 years ago
4 0

Answer:

5) 3 0 0

Explanation:

Given data

int [] val = { 3, 10, 44 };

The total number of parameters of given array are 3, so total length of array is also 3.

The indexing of array starts with '0', Therefore the indexes of array with length zero are: {0,1,2}

The value of array at index 0 is = 3

similarly

value at index 1 = 10

value at index 2 = 44

Here, Int i = 1 is storing the value '1' in integer variable i.

In addition to that, any value of index 'i' of an array is selected using array[i].

Therefore,

val[i] = i-1 is copying the value (i-1 = 1-1 = 0) to the index '1'  of the array because i = 1.

So value at index 1 would be = val[1] = 0

The term i++ is incrementing the value of i, it makes i =2

val[i] = i-1 is copying the value (i-1 = 1-1 = 0) to the index '2' of the array because i = 2 now.

So value at index 2 would be = val[2] = 0

Hence, the output would be {3 0 0}. So 5th option is correct.

You might be interested in
What are the factors that influence the selection of access control software and/ or hardware? Discuss all aspects of access con
skelet666 [1.2K]

Answer:

While selecting the access control system (software or hardware), there are many factors that influence it and those factors are campus location, network capabilities, number of users using it, size of campus, the motive for using it, etc.

Explanation:

The access control system is electronic device that needs to be connected to the network for providing security control and authorization to the user to enter into the Campus.  

Access control systems are used to control access into premises or any IT area which is control in two ways either in a physical way or a logical way.

8 0
3 years ago
Given the following code fragment and the input value of 4.0, what output is generated?
kicyunya [14]

Answer:

c) 4.4

Explanation:

You can evaluate step by step the code. You know tha your input is 4.0

Step 1 Variables definitions:

double tax;

double total;

Step 2 Ask the user for the input:

System.out.print("Enter the cost of the item");

Step 3 read de input:

total = scan.nextDouble();

Step 4 evaluate the condition (  is the input greater or equal  than 3.0 ? [True])

if ( total >= 3.0)

Step 5 get done the operations inside the condition and print it:

tax = 0.10;

System.out.println(total + (total * tax));

4 0
3 years ago
using a for loop, write a program that prints out the decimal equivalents of 1/2, 1/3, 1/4,..., 1/10.
ValentinkaMS [17]
In python:

##Specifies the range that the variable 'number' should change within
for number in range(2,10):
##Prints the decimal equivalent of each fraction
    print(1 / number)
5 0
3 years ago
Which of the following collects and provides reports on failed login attempts, probes, scans, denial-of-service attacks, and det
Marrrta [24]

Answer: Option B. System logs

Explanation:

A system log contains records of events that are logged by the operating system components. These events are often predetermined by the operating system itself and they indicates how the system processes and drivers were loaded. System log files may contain information about device changes, device drivers, system changes, events, operations and more.

6 0
3 years ago
Read 2 more answers
What is the correct order for the boot phases of a Linux computer?
galina1969 [7]

BIOS

Boot loader

OS Kernel

Init

6 0
3 years ago
Other questions:
  • Select the proper ergonomic keyboarding techniques.
    9·1 answer
  • Search engines enable you to
    9·2 answers
  • . SQL is a(n) _____ language.
    8·1 answer
  • Which statement is NOT true:
    9·1 answer
  • Advertising is organized around four distinct groups. The _____ group includes the photographers, the illustrators, video produc
    9·1 answer
  • Of the key reasons for creating organizational units which of the following is not one of them?
    13·1 answer
  • Create a datafile called superheroes.dat using any text-based editor, and enter at least three records storing superheroes’ name
    9·1 answer
  • What is the law of the XNOR logic gate?
    10·1 answer
  • A computer scientist creates an app that tells you a funny joke each time you touch the Joke button.
    15·1 answer
  • A peripheral can be used to tell a computer to complete a specific task.<br> A) True <br> B)False
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!