Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / University of California, Irvine ICS 141 Chapter 6 - Check your understanding 1)Name eight major categories of control-flow mechanisms

University of California, Irvine ICS 141 Chapter 6 - Check your understanding 1)Name eight major categories of control-flow mechanisms

Communications

University of California, Irvine

ICS 141

Chapter 6 - Check your understanding

1)Name eight major categories of control-flow mechanisms.

 

 

  1. What distinguishes operators from other sorts of functions?

 

 

  1. Explain the difference between prefix, infix, and postfix notation. What is Cambridge Polish notation? Name two programming languages that use post-fix notation.

 

  1. Why don’t issues of associativity and precedence arise in Postscript or Forth?

 

 

 

  1. What does it mean for an expression to be referentially transparent?

 

 

 

  1. What is the difference between a value model of variables and a reference model of variables? Why is the distinction important?

 

 

  1. What is an l-value? An r-value?

 

 

  1. Why is the distinction between mutable and immutable values important in the implementation of a language with a reference model of variables?

 

 

  1. Define orthogonality in the context of programming language design.

 

 

  1. What is the difference between a statement and an expression? What does it mean for a language to be expression-oriented?

 

 

  1. What are the advantages of updating a variable with an assignment operator, rather than with a regular assignment in which the variable appears on both the left- and right-hand sides?

 

 

Chapter 6.2

 

  1. Given the ability to assign a value into a variable, why is it useful to be able to specify an initial value?

 

 

  1. What are aggregates? Why are they useful?

 

 

  1. Explain the notion of definite assignment in Java and C#.

 

 

  1. Why is it generally expensive to catch all uses of uninitialized variables at run time?

 

 

  1. Why is it impossible to catch all uses of uninitialized variables at compile time?

 

 

  1. Why do most languages leave unspecified the order in which the arguments of an operator or function are evaluated?

 

 

  1. What is short-circuit Boolean evaluation? Why is it useful?

 

 

  1. List the principal uses of goto, and the structured alternatives to each.

 

 

  1. Explain the distinction between exceptions and multilevel returns.

 

 

 

  1. What are continuations? What other language features do they subsume?

 

 

  1. Why is sequencing a comparatively unimportant form of control flow in Lisp?

 

 

  1. Explain why it may sometimes be useful for a function to have side effects.

 

 

  1. Describe the jump code implementation of short-circuit Boolean evaluation.

 

 

  1. Why do imperative languages commonly provide a case or switch statement in addition to if... then ... else?

 

 

  1. Describe three different search strategies that might be employed in the implementation of a case statement, and the circumstances in which each would be desirable.

 

 

  1. Explain the use of break to terminate the arms of a C switch statement, and the behavior that arises if a break is accidentally omitted

 

 

  1. Describe three subtleties in the implementation of enumeration-controlled loops.

 

 

  1. Why do most languages not allow the bounds or increment of an enumeration controlled loop to be floating-point numbers?

 

 

  1. Why do many languages require the step size of an enumeration-controlled loop to be a compile-time constant?

 

 

  1. Describe the “iteration count” loop implementation. What problem(s) does it solve?

 

 

  1. What are the advantages of making an index variable local to the loop it controls?

 

 

  1. Does C have enumeration-controlled loops? Explain.

 

 

  1. What is a collection (a container instance)?

 

 

  1. Explain the difference between true iterators and iterator objects.

 

 

  1. Cite two advantages of iterator objects over the use of programming conventions in a language like C.

 

 

  1. Describe the approach to iteration typically employed in languages with first class functions.

 

 

 

  1. Give an example in which a mid-test loop results in more elegant code than does a pretest or post-test loop.

 

 

  1. What is a tail-recursive function? Why is tail recursion important?

 

 

  1. Explain the difference between applicative- and normal-order evaluation of expressions. Under what circumstances is each desirable?

 

 

  1. What is lazy evaluation? What are promises? What is memoization?

 

 

  1. Give two reasons why lazy evaluation may be desirable.

 

 

  1. Name a language in which parameters are always evaluated lazily.

 

 

  1. Give two reasons why a programmer might sometimes want control flow to be nondeterministic.

 

 

Option 1

Low Cost Option
Download this past answer in few clicks

7.83 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions