Computer AwarenessVery hardIBPS SO IT Officer · SSC CGL
An empty stack receives PUSH 5, PUSH 8, POP, PUSH 3, PUSH 9, POP, POP. What will the NEXT pop return?
- A. 8
- B. 3
- C. 9
- D. 5
Correct answer: D. 5
After PUSH 5, 8 the POP removes 8; PUSH 3, 9 then two POPs remove 9 and 3, leaving only 5. A stack is last-in, first-out.
हिंदी में
एक खाली स्टैक को PUSH 5, PUSH 8, POP, PUSH 3, PUSH 9, POP, POP मिलते हैं। अगला POP क्या लौटाएगा?
- A. 8
- B. 3
- C. 9
- D. 5
उत्तर: D. PUSH 5, 8 के बाद POP 8 हटाता है; फिर PUSH 3, 9 और दो POP 9 तथा 3 हटाते हैं, जिससे केवल 5 बचता है। स्टैक अंतिम-अंदर, पहला-बाहर (LIFO) होता है।
More Computer Awareness questions
- Graphics processors (GPUs) are widely used to train machine-learning models mainly because they:
- A hard disk is sold as '500 GB', yet Windows reports its size as about 465 GB. Why?
- A 4 × 6 inch photograph is scanned at 300 dpi. How many pixels does the scanned image contain?
- How many times larger is the key space of a 128-bit key than that of a 64-bit key?
- SHA-256 hashes are computed for a 1-byte file and a 1 GB file. How long are the two hash values?
- In a one-address (accumulator-based) machine, what does the instruction ADD X do?