Answer:
"The kernel" is the correct answer for the above question
Explanation:
- The kernel is used to execute any process such as assign the memory to the "process" or loads the program counter.
- It is the part of the operating system which is responsible for executing the process.
- When any application program enters in the stage of execution, then that program is known as the process.
- The above question asked about the components which are responsible to load the pc for an application program. That component is known as "The kernel".
- So "The kernel" is the correct answer for the above question while the other is not because other options are related to the program and operating system, they are not related to the Process but the Pc is related to the process only.
Answer:
B). 3 lines
Explanation:
In order to modify the loop is drawn using three circles to make it drawn employing ten circles, <u>the code must be comprised of three lines</u>. The execution of line 1 includes 3 as the value of x while y remains undefined. Line 2 would employ the same value of x i.e. 3 and the introductory value of y(5 = 3 + 2) where x + 2 is being executed. In the third line, 10 circles can be drawn in total in the loop as {2(previous value) * 5 = 10}, y's updated value.
Answer:
Python 3 code:
n = int(input())
rev_str = [ ]
for i in range(n):
s = str(input())
s.split()
words = s.split(' ')
string = [ ]
for word in words:
string.insert(0, word)
rev_str.append(" ".join(string))
#print(" ".join(string))
for i in range(len(rev_str)):
print(rev_str[i])
Explanation:
Answer:
- import java.util.Arrays;
- public class Main {
-
- public static void main(String[] args) {
- String [] first = {"David", "Mike", "Katie", "Lucy"};
- String [] middle = {"A", "B", "C", "D"};
- String [] names = makeNames(first, middle);
-
- System.out.println(Arrays.toString(names));
- }
-
- public static String [] makeNames(String [] array1, String [] array2){
-
- if(array1.length == 0){
- return array1;
- }
-
- if(array2.length == 0){
- return array2;
- }
-
- String [] newNames = new String[array1.length];
-
- for(int i=0; i < array1.length; i++){
- newNames[i] = array1[i] + " " + array2[i];
- }
-
- return newNames;
- }
- }
Explanation:
The solution code is written in Java.
Firstly, create the makeNames method by following the method signature as required by the question (Line 12). Check if any one the input string array is with size 0, return the another string array (Line 14 - 20). Else, create a string array, newNames (Line 22). Use a for loop to repeatedly concatenate the string from array1 with a single space " " and followed with the string from array2 and set it as item of the newNames array (Line 24-26). Lastly, return the newNames array (Line 28).
In the main program create two string array, first and middle, and pass the two arrays to the makeNames methods as arguments (Line 5-6). The returned array is assigned to names array (Line 7). Display the names array to terminal (Line 9) and we shall get the sample output: [David A, Mike B, Katie C, Lucy D]