ExamsSCHOOL OF SCIENCE AND TECHNOLOGY

National Open University Exam Past Question – CIT 445 OCTOBER/NOVEMBER 2014 EXAMINATION

NATIONAL OPEN UNIVERSITY OF NIGERIA CIT 445 Principles and Techniques of Compilers

14-16 AHMADU BELLO WAY, VICTORIA ISLAND LAGOS SCHOOL OF SCIENCE AND TECHNOLOGY

OCTOBER/NOVEMBER 214 EXAMINATION

 

 

COURSE CODE: CIT 445

COURSE TITLE: Principles and Techniques of Compilers

TIME ALLOWED: 3Hours

INSTRUCTION: Answer any five (5) questions.

 

 

 

1a. List the ten (10) types of information required by a compiler   (10 marks)

 

1b. Explain the term “formal system”                    (2 marks)

 

1c. Outline any two properties an optimising compiler should provide (2 marks)

 

 

 

 

2a. Describe each of the following parameter passing method:

 

  1. i) Call by value

 

  1. ii) Call by reference iii)  Call by name
  2. iv) Call by value result  12 marks

 

2b. Define the term “Translators”  (2 marks)

 

 

 

 

3a. Complete the table by inserting the Translators and Target languages of the mentioned Source languages. (10 marks)

 

Source Language Translator Target Language
LaTeX    
SQL    

 

 

Java    
English text    
Regular Expressions    
BNF of a language    

 

 

3b. Explain the term “Formal Grammer”               2 marks

 

3c. Why Do We Need Translators?                         2 marks

 

YOU MAY ALSO LIKE  National Open University Exam Past Question – AGB 404 JUNE/JULY EXAMINATION

 

 

 

4a. Outline the challenges involved in developing compilers (11 marks)

 

4b. What is a Compiler?                                            3 marks

 

 

 

 

 

 

5a. Explain the four (4) components of a compiler (8 marks)

 

5b. Mention six (6) reasons why there is a need to study LR grammars                   (6 marks)

 

 

 

 

6a. Clearly explain the four (4) benefits of parsing            (8 marks)

 

6b. Consider porting a compiler for C written in C from an existing machine A to an existing machine

  1. Write out the steps to cross compilation? (6 marks)

 

7a. What are the errors that could occur during Lexical Analysis (8 marks)

 

7b. Discuss the following:                                         (6 marks) I.        Loop Optimizations

  1. Strength Reduction

 

III.       Function Chunking

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button