20101026

20101026 - CS-441 Fall 2010 JWJ CS UKThis material is only...

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 UKThis material is only for use in CS441-Fall 2010 in the Department of Computer Science at the University of Kentucky.Please, do not distribute.Learning outcomes:Run-time memory management. Scoping rules. Dynamic and static scope Code generation.Yacc.InstructionsSubmit your answers on-line. Independent work. Can use materials such as handouts, notes, books. Individualwork only.4.7.1. 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:a) 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:1main calls B;B calls C;etc....
View Full Document

Page1 / 3

20101026 - CS-441 Fall 2010 JWJ CS UKThis material is only...

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