Stack is LIFO data structure (Last In First Out) where the last element entered in stack will be the last one to be out of stack. It has three operations: push() : used to insert an element in stack, pop() : used to delete an element from the stack, top() : used to return the top of the stack i.e. the newest member of the stack. All these operations will take place at the top.
<u>Explanation:</u>
Now, looking at the program, x and y are initialized the values of 2 and 3 respectively. The stack pushes 8 onto the stack making it the first member of the stack. Then the value of x which is 2 is pushed onto the stack. Next, (x+5) = (2+5) = 7 is pushed onto the stack.
Pop() is used to delete hence 7 is popped out from the stack. top() is assigned to y which is 2 in this case and again 2 is popped out from the stack. Now, (x+y) = (2+2) = 4 is pushed onto the stack. And the top() is assigned to x which is 4. 4 is again popped out from the stack. Hence the value of x is 4.
With 8<span> bits used to represent each color value, one pixel requires </span>24<span> bits. The number of colors available in a graphic is referred to as color depth. I hope you understand! :-)</span>
Answer:
4.24
Explanation:
First you find the mean of the data set, which is 7. Then to find standard deviation you have to follow the formula which tells you to subtract the mean from each number under the square root : √(2 - 7)^2 + (9 - 7)^2 + (10 - 7)^2 + (4 - 7)^2 + (8 - 7)^2 + (4 - 7)^2 + (12 - 7). Once you solve the parenthesis you square it, once you square it the negatives won't matter. That will leave you with this : √(25 + 4 + 9 + 9 + 25). The formula tells you to find the sum of those numbers (which is 72) then subtract one from how many numbers there are, 5 - 1 = 4, and divide your sum by that number. So 72 / 4 = 18. Then you find the square root of 18 and that becomes your answer.