Computer AwarenessHardIBPS SO IT · IBPS PO Mains
In which order does a compiler normally carry out these phases on a source program?
- A. Syntax analysis → lexical analysis → semantic analysis → code generation
- B. Lexical analysis → semantic analysis → syntax analysis → code generation
- C. Lexical analysis → syntax analysis → semantic analysis → code generation
- D. Lexical analysis → syntax analysis → code generation → semantic analysis
Correct answer: C. Lexical analysis → syntax analysis → semantic analysis → code generation
The source is first split into tokens (lexical), then tokens are arranged into a parse tree (syntax), then checked for meaning such as types (semantic), and only then is code generated.
हिंदी में
कंपाइलर किसी स्रोत प्रोग्राम पर इन चरणों को सामान्यतः किस क्रम में करता है?
- A. वाक्य-विन्यास विश्लेषण → शब्द-विश्लेषण → अर्थ-विश्लेषण → कोड निर्माण
- B. शब्द-विश्लेषण → अर्थ-विश्लेषण → वाक्य-विन्यास विश्लेषण → कोड निर्माण
- C. शब्द-विश्लेषण → वाक्य-विन्यास विश्लेषण → अर्थ-विश्लेषण → कोड निर्माण
- D. शब्द-विश्लेषण → वाक्य-विन्यास विश्लेषण → कोड निर्माण → अर्थ-विश्लेषण
उत्तर: C. स्रोत को पहले टोकन में बाँटा जाता है (शब्द-विश्लेषण), फिर टोकन को पार्स ट्री में व्यवस्थित किया जाता है (वाक्य-विन्यास), फिर अर्थ की जाँच की जाती है जैसे टाइप (अर्थ-विश्लेषण), और उसके बाद ही कोड बनाया जाता है।
More Computer Awareness questions
- A 5-stage instruction pipeline takes one clock cycle per stage and never stalls. How many clock cycles does it need to complete 100…
- How many of these statements about RISC and CISC processors are correct? I. RISC designs usually use fixed-length instructions. II. CISC…
- The Boolean expression A'B + AB' + AB (where ' means NOT) simplifies to which single operation on A and B?
- A hard disk spins at 7200 rpm and has an average seek time of 8 ms. Ignoring transfer and controller time, what is its average access time?
- How many of these statements are correct? I. A solid-state drive has no moving read/write head. II. Flash memory cells can be rewritten…
- In a virtual memory system, a 'page fault' occurs when a program refers to a page that: