Question
1.
2.
3.
4.
Answer (Detailed Solution Below)
Option 4 : 2, since 5 + (3×2) − 9 = 2 / 2, क्योंकि 5 + (3×2) − 9 = 2
Advertisement
Detailed Solution
सही उत्तर 2, since 5 + (3×2) − 9 = 2 / 2, क्योंकि 5 + (3×2) − 9 = 2 है।
Key Points
Helpful?
Question:
Using a stack, work out the result of the postfix notation 5 3 2 * + 9 − / स्टैक का प्रयोग करते हुए postfix संकेतन 5 3 2 * + 9 − का परिणाम ज्ञात कीजिए
1.
20, by evaluating strictly left to right ignoring the stack / 20, स्टैक अनदेखा कर strictly बाएँ से दाएँ मूल्यांकन से
2.
−2, by subtracting before completing the multiplication / −2, गुणा पूरा करने से पहले घटाने से
3.
14, by adding 9 instead of subtracting it / 14, 9 घटाने के बजाय जोड़ने से
4.
2, since 5 + (3×2) − 9 = 2 / 2, क्योंकि 5 + (3×2) − 9 = 2
Correct Answer: 2, since 5 + (3×2) − 9 = 2 / 2, क्योंकि 5 + (3×2) − 9 = 2
Scanning with a stack: push 5, 3, 2; * gives 6; + gives 11; − 9 gives 2. The distractors come from ignoring stack discipline or operator order. / स्टैक से स्कैन: 5, 3, 2 push; * से 6; + से 11; − 9 से 2। भ्रामक विकल्प स्टैक-अनुशासन या ऑपरेटर-क्रम अनदेखा करने से बनते हैं।
Downloaded from PrepSnap (prepsnap.in)