Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Programming languages: For each of the following, give two different programming

ID: 3853221 • Letter: P

Question

Programming languages:

For each of the following, give two different programming language statements that demonstrate two different forms of using the statement and briefly describe the distinction in the forms. As the answer to (f) is the most complex, we answer it for you in order to give you an example as to how you might approach (a)-(e) You do not have to use an actual programming language, but if you invent your own, be sure the example is appropriate and you describe why it is so. a) Variable Declaration b) Variable Typing c) Variable Binding d) Variable Visibility e) Variable Scoping Variable Iping

Explanation / Answer

a) Variable declaration :

Variable Visibility :

Variable Binding :

C JAVA
  • C requires local variable declarations to be made at the beginning of a method or block.
  • Java allows them anywhere in a method or block.