# Programming and Machine Independency

1. Suppose f is a function that returns the result of reversing the string of symbols given as its input, and g is a function that returns the concatenation of the two strings given as its input. If x is the string abcd, what is returned by g(f(x),x)?

2. What ambiguity exists in the statement

X <-- 3 + 2 * 5

© BrainMass Inc. brainmass.com October 9, 2019, 4:00 pm ad1c9bdddfhttps://brainmass.com/computer-science/programming-language-theory/programming-machine-independency-19385

#### Solution Preview

1.)

as x = abcd

Hence,

f(x) = dcba

g(f(x),x) = g(dcba,abcd) ...

#### Solution Summary

This solution shows the calculatiosn for programming and machine independency.

$2.19