# 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 March 4, 2021, 5:56 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.49