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

Programming
Tutor: None Selected Time limit: 0 Hours

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

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Apr 21st, 2015
...
Apr 21st, 2015
Dec 3rd, 2016
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