Answer:
Please check the attachment.
Remember:
All N1, N2, N3N, N4, N5, N6, N7 and each of them are certainly like the server. Also note that Router, repeaters, switch and transmitter are not mentioned in the above diagram. Please assume it in between each location.
Explanation:
Please check the attachment. Also, Remember that Server is at the head office, and rest 7 are the 7 branches. The VOIP, video surveillance, Door security system and the computer networks are being shown in the diagram. And each location has a network of computers joined through VLAN, and each of them are given the IP addresses of Class A, Class B and class C of the iPV4(or IPV6), which can be found by the future network administer, operators through the IP address, that is assigned.
Answer:
There is only one modification in the above loop i.e. while loop should be like this--
while (i != n)
{
sum+=arr[i]; // Line 1, In question segment it is line 2.
i++; // Line 2, In question segment it is line 1.
}
Output:
Now if the array input is 1,2,3,4,5 then the output is 15.
Explanation:
In the above question, all the line of the segment is right except the body of the loop because--
- The First line of the loop is increment statement which increments the value of "i" variable from 1 and the value of "i" variable will be 1 in the first iteration of the loop
- The second line starts to add the value from 1'st index position of the array. Hence the segment gives the wrong answer. It adds the arr[1] to arr[n-1].
- So I interchanged both lines of the while loop as shown in the answer part. I make the line 1 (In question segment) as line 2(In answer part) and line 2 (In question segment) as line 1 (In answer part).
Now It gives the correct output because it can add arr[0] to arr[n-1].
Blind Carbon Copy
For emails. It is used to send a copy of the email to somebody without the original person receiving it knowing that you sent a copy.
Answer:
a=4 , b=1
Explanation:
I'm not a computer science major at all but I think I can help you with this code.
Our program wants us to add 2 to a get new a value while also subtracting 1 from b value to obtain new b value. We we want to for for as long b is not 0 and a/b is nonnegative.
One round we get:
New a=0+2=2
New b=3-1=2
Let's see if we can go another round:
New a=2+2=4
New b=2-1=1
We can't go another round because b would be negative while a is positive which would make a/b negative. So our loop stops at this 2nd round.
a=4 , b=1
Other notes:
2nd choice makes no sense because a is always going to increase because of the addition on a and b was going to decrease because of the subtraction on it.
Third choice makes no sense because a/b doesn't even exist.
Fourth choice a/b is negative not nonnegative.