0 votes 0 votes a) (i) and (ii) only b) (ii) and (iii) only c) (i) and (iv) only d) All are correct Compiler Design compiler-design intermediate-code compilation-phases test-series + – stblue asked Aug 26, 2017 • retagged Jul 3, 2019 by Cristine stblue 874 views answer comment Share Follow See all 8 Comments See all 8 8 Comments reply Warlock lord commented Aug 26, 2017 reply Follow Share I think the answer should be a 0 votes 0 votes stblue commented Aug 26, 2017 reply Follow Share i had doubt on (ii), "the main purpose of semantic analyzer is to produce intermediate code", i used to think its used for type checking and ICG is used to produce intermediate code. 0 votes 0 votes Hira Thakur commented Aug 26, 2017 reply Follow Share option d 0 votes 0 votes stblue commented Aug 26, 2017 reply Follow Share @ Hira Thakur answer should not be d, see point iii, it says ICG doesnot use symbol table which is wrong. 0 votes 0 votes Warlock lord commented Aug 26, 2017 reply Follow Share @stblue you are right about semantic analyser. It is used for type checking and thus form an annotated syntax tree which is further used for code generation I had my reservations against statement iv as well because I think Intermediate and machine code generator can be same if code optimization is neglected (I think I remember reading this, plesae correct me if I'm wrong). That's why I opted for a 0 votes 0 votes stblue commented Aug 26, 2017 reply Follow Share @Warlock i also believe ICG and MCG can be combine, if we are developing compiler for single machine, then we can combine ICG with MCG , so option iv also seems to be wrong to me. 0 votes 0 votes stblue commented Aug 26, 2017 reply Follow Share So i think correct answer should be (i) only, which is not present in any option. @joshi_nitish @just_bhavana @Shubanshu what do you think ? 0 votes 0 votes joshi_nitish commented Aug 26, 2017 reply Follow Share i also think only (i) is correct. 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes I think option c, is correct. Nihal Singh answered Oct 4, 2021 Nihal Singh comment Share Follow See all 0 reply Please log in or register to add a comment.