Question:
Which data structure is primarily used by compilers for syntax parsing and expression evaluation?
सिंटैक्स पार्सिंग और व्यंजक मूल्यांकन के लिए कंपाइलर द्वारा मुख्य रूप से किस डेटा संरचना का उपयोग किया जाता है?
Options:
- Stack
- Queue
- Binary Tree
- Graph
- स्टैक (Stack)
- कतार (Queue)
- बाइनरी ट्री (Binary Tree)
- ग्राफ (Graph)
Correct Answer: a)
Explanation:
A Stack (LIFO) is the fundamental data structure used for infix-to-postfix conversion, postfix evaluation, recursive function call management, and bottom-up/top-down parsing (Option a).
कंपाइलर में पार्सिंग, कोष्ठक मिलान और व्यंजक मूल्यांकन के लिए स्टैक (Stack) का उपयोग किया जाता है (विकल्प a)।