cs441f10-ex2-sample

cs441f10-ex2-sample - CS-441 Fall 2010 JWJ CS UKAssignment...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS-441 Fall 2010 JWJ CS UKAssignment Sample ExamThis material is only for use in CS441-Fall 2010 in the Department of Computer Science at the University of Kentucky.Please, do not distribute.Due: Practice test for tuesday, Nov 23, 2010 examLearning outcomes:Run-time memory management. Scoping rules. Code generation. Yacc/bison. Attributtedgrammars/syntax-directed translation.InstructionsStudy the class notex, textbook and hw assignment sepcs. Solve exercises 8.1, 7.7 and 10.4 from the book. Solvethe problems listed below.The exam will be closely modeled on the suggested exercises and problems.A. Run-time storage managementConsider the following programvar x,y,z;procedure A;var x;{ x:=1;y:= x*2 +1}procedure B;var y;procedure C;var z;procedure D;var y;{ x:= 1.25*z;call A;writeln(x)};{ z:=1;call A;call D};{ call C;writeln(x)};{ x:=0;call B;write(x)};Questions:1a) draw blocks around procedures to indicate the block structure of the program.b) what is the nesting level (largest block number)?c) write the execution history for this program in the form:main calls B;B calls C;etc....
View Full Document

This document was uploaded on 12/14/2010.

Page1 / 5

cs441f10-ex2-sample - CS-441 Fall 2010 JWJ CS UKAssignment...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online