Time remaining:
For each + operator in each of the following expressions, say which type of + is

label Programming
account_circle Unassigned
schedule 0 Hours
account_balance_wallet $5

Consider an unknown language with a left - associative + operator that is overloaded to have the following type: int*real -> real, int*int -> int, real*int _> real, and real*real->real.Suppose the variable i has type int and the variable r has type real.For each + operator in each of the following expressions, say which type of + is used:a. i + r

b. i + r + i

c. i + ( r + i)

d. I + i + r + ( r+i)

Apr 21st, 2015

With the given information the + operator was overloaded into logical 'and' operator.

due to the rules of that overloaded operator :

a. i+r  will be  r    ( int*real -> real)

b. i+r+i  will be r ( int*real -> real => real*int -> real )

c. i + ( r + i) will be r (  real*int -> real => int*real -> real )

d. i + i + r + ( r+i) will be r ( real*int -> real =>  real*real->real => int*real -> real => int*real -> real )

Apr 21st, 2015

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Apr 21st, 2015
...
Apr 21st, 2015
Jun 27th, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer