CS 430/530  Quiz – October 7, 2004

 

 

Name____________________  Possible points:  10  Earned points :  _____

 

Note:  the numbers in parentheses indicate the points you can earn for each question.  Those with only 1 point are right or wrong (no part credit).

 

 

  1. What is the definition of a key word?  (1)

 

A keyword  is a word of a programming language tha is special only in certain contexts.  FORTRAN uses key words  p. 192

 

 

  1. What is the primary disadvantage of have a language be case sensitive?  (1)

 

readability – names that look the same aren’t.

slide 8

Java, C++, C are case sensitive languages. FORTRAN, Pascal, Ada are not.

 

  1. “ Variables can be characterized as a sextuple of attributes.”  What are 5 of the six attributes of a variable?        (5)

 

name, address, value, type, lifetime, and scope   slide 10

 

 

 

  1. What does it mean for a binding to be dynamic?   (1)

 

A binding is dynamic if it first occurs during execution or can change during execution of the program.    slide 16

 

 

  1. “The scope of a variable is the range of statements over which is is visible.”  What are the two types of scope discussed in this chapter?      (2)

static and dynamic   was what i was looking for  I gave credit for  local and non-localslides 34 and 41 respectively