Answer:
1BD.C
Explanation:
Keep in mind that octal number has 3 binary fields where the right field is the number 1, the center field is the number 2 and the left field is the number 4. you need that your 3 fields sum the final octal digit.
For example :
- (1)8 = (001)2
- (2)8 = (010)2
- (3)8 = (011)2
The hexadecimal number has 4 binary fields where the right field is the number 1, the center field is the number 2 , the next center field is the number 4 and the left field is the number 8. you need that your 4 fields sum the final hexadecimal digit.
For example:
- (F)16 = (1111)2
- (1)16 = (0001)2
- (6)16 = (0110)2
Step 1: Split your octal number in digits and convert to binary form
6 7 5 . 6
110 111 101 . 110
Step 2: Join your binary number and split in groups of 4 elements from the point (Important note: If you miss some element to complete the groups at the left of the point complete with zero's at the left, else if you miss some element to complete the groups at the right of the point complete with zero's at the right)
binary complete: 110111101.110
binary in groups of 4:
1 1011 1101 . 110
Complete the groups with zero's (Remember the important note):
0001 1011 1101 . 1100
Step 3: Calculate the hexadecimal number
1 B D . C
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].
Answerthats nice
(: -With Star
Explanation:
Answer:
Student Government. ...
Academic Teams and Clubs. ...
The Debate Team. ...
The Arts. ...
Internships. ...
Culture Clubs. ...
Volunteer Work and Community Service. ...
The Student Newspaper.
Explanation:
Answer:
Memory is the faculty of the brain by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action.
Explanation: