Answer: it indents
Explanation:
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].
Answer:
Umm was there supposed to be a picture????
Explanation:
Hope you have a wonderful Christmas Eve time with your family!!❄️
Answer:
A and C
Explanation:
Option A:
In IPv6 there is a rule to reduce an IPv6 address when there are two or more consecutive segments of zeros just one time. This rule says that you can change the consecutive zeros for “::”
Here is an example
How to reduce the following IPv6 address?
ff02:0000:0000:0000:0000:0000:0000:d500
Ans: ff02::d500
Example 2:
2001:ed02:0000:0000:cf14:0000:0000:de95
Incorrect Answer -> 2001:ed02::cf14::de95
Since the rule says that you can apply “::” just one time, you need to do it for a per of zero segments, so the correct answer is:
Correct Answer -> 2001:ed02::cf14:0:0:de95
Or
2001:ed02:0:0:cf14::de95
Option C:
Since in IPv6 there are
available addresses which means 340.282.366.920.938.463.463.374.607.431.768.211.456 (too many addresses), there is no need of NAT solution, so each device can have its own IP address by the same interface to have access through the internet if needed. If not, you can block the access through internet by the firewall.
Answer:
1.ClassName and . operator
2. ClassName and [] operator
Explanation:
There are two ways to get the members of a class first one is by using dot(.) operator.
Example : with assumption that person is a class object and age is the member in it we can use it as:
person.age
Second way is to use [] operator with member as a string in it which is used by the compiler as key to get its value.
Example : person["age"]