Answer:
The value of k is 4
Explanation:
Solution
Given that:
k = integer
Input size = 500
The algorithm takes a run of = 16 seconds
Input size = 750
The algorithm takes a run of = 81 seconds
Now,
We have to determine the value of k
The equation is shown below:
(500)^k /16 = (750) ^k /81
Thus
(750/500)^ k = 81/16
= (3/2)^k
=(3/2)^ 4
k is = 4
Calculate the sum of the first 5 positive odd integers: Let's do this in our head first, so we can check if our code is right or not!
The first positive 5 odd integers are: 1, 3, 5, 7, 9
Sum these to: 25
int sum = 0, k; <------These just declare our variables, telling the program 'Hey, I'm going to use 'sum' and 'k' to store data.
for (k = 1; <---We're going to repeat the following code, and we're starting at 1
k <= 10; <---- We're going to continue to repeat until we greater than 10.
k += 2) <------ Every time we do a loop, we're going to add 2.
{ sum += k; } <---- We're going to increase the number inside "sum" by the number inside "k"
Let's run this and see what happens. Remember, we keep going until we hit more than 10.
Round 0: k = nothing, sum = 0 (before we start the loop)
Round 1: k = 1, sum = 1
Round 2: k = 3, sum = 1+3 or 4
Round 3: k = 5, sum = 4 + 5 or 9
Round 4: k = 7, sum = 9 + 7 = 16
Round 5: k = 9, sum = 16 + 9 = 25
Round 6: k = 11, sum = 25 + 11 = 36
Well, we can tell here that round 5 was correct, but round 6 is not correct. And our loop condition says <=10, which means we have to do Round 6.
This means we did it one too many times. Our ending condition should be <10, instead of <=10.
Option B
I would think layered security or defense in depth
Answer:
The answer is "Action".
Explanation:
The directory /etc/inittab file is also known as a configuration file that is used by the System V (SysV) initialization system in Linux. where System V stands for system version that is used for Unix and Linux both. It was developed in AT&T. This configuration file includes three items that are:
- Runlevel norm
- Which procedures should you begin, track and restart when you end?
- Which actions to perform when a new run level is introduced?
Example: id:runlevels:action:process
- id stands for identification code. It includes a sequence of one to four characters that identify in function.
- runlevels it is a list that runs on levels in which this applies.
- action is a specifies code in the field that describes to init how to run the process.
- A process is a command that is ready to execute.