Answer:
where are the step number. I can't find any
I think it is B I am pretty sure of it
Usually a LAN (Local Area Network), but it's not a requirement. A WAN (Wide Area Network) would need to be used in a multi-campus setup.
Answer:
Option 2: Reads one value and places it in the remaining first unused space endlessly.
Explanation:
Given the code as follows:
- int[] a = {1, 3, 7, 0, 0, 0};
- int size = 3, capacity = 6;
- int value = cin.nextInt();
- while (size < capacity && value > 0)
- {
- a[size] = value;
- }
The a is an array with 6 elements (Line 1). The program will prompt the user for an integer and assign it to variable <em>value </em>(Line 3).
The while loop have been defined with two conditions, 1) <em>size < capacity </em>and <em> value > 0</em>. The first condition will always be true since the size and capacity are <em>constant</em> throughout the program flow and therefore<em> size</em> will always smaller than capacity.
Hence, if user input an integer larger than 0, the while loop will infinitely place the same input value to the remaining first unused space of the array, <em>a[3]</em>.
Answer:
Following are the method to the given question:
def copy(s, n):#defining a method copy that takes two parameters
if n <= 0:#definig if to compare n value is less than equal to 0
return ''#return space
else:#definig else block
return s + copy(s, n-1)#use recursive method that return value
print(copy("by",2))#calling method and print value
print(copy("ta",2))#calling method and print value
print(copy("good by ",2))#calling method and print value
Output:
byby
tata
good by good by
Explanation:
In this code, a method "copy" is declared that takes two parameters that are "s and n" inside the method a conditional statement is used which can be defined as follows.
In the if block is used "n" variable that checks n value which is less than equal to 0 if it is true it will return a space value.
In the else block it use the recursive method that returns a value which is a copy of s that is concatenated together.