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

1.) What are the pros and cons of languages that distinguish between capital and

ID: 3883980 • Letter: 1

Question

1.) What are the pros and cons of languages that distinguish between capital and lowercase lettersin user-defined names?

2.)Suppose that the equal_lists function (page 49 of Sebesta) is called with the lists (A (B) (C)) and(A (B) (C)) as the arguments.

(a) What will be the return value of the function?

(b)Draw the recursion tree as we did in class. How many total calls of equal_lists will be performed, including the original call and all recursive call

4. What are the pros and cons of languages that distinguish between capital and lowercase letters in user-defined names? Suppose that the equal_lists function (page 49 of Sebesta) is called with the lists (A (B) (C)) and (A (B) (C)) as the arguments. 5. (a) What will be the return value of the function?

Explanation / Answer

4)Answer:

Pro:

having case sensitive identifiers gives a much broader name space (more possible identifiers) and avoids possible confusion for the programmer when two names that appear different in the program are taken as the same by the compiler.

Con:

case sensitivity leads to small, hard to detect differences between identifiers, making the program harder to read and potentially introducing errors.