Question: Can you answer on python or java language? Thanks!! 1. Write a segment code in any language you prefer that behaves differently if the language

Can you answer on python or java language? Thanks!!

Can you answer on python or java language? Thanks!! 1. Write a

1. Write a segment code in any language you prefer that behaves differently if the language used a. structural equivalence (student's answer may vary) two types as the same if they consist of the same components. Example: TYPE T1 = RECORD AINTEGER REARRAY [0..101 oF CHAR: END: TYPE T2RECORD INTEGER h:ARRAY I0..101 OF CHAR: END Types Tl and T2 are equivalent. Algol-68, Modula-3, C, ML use structural type equivalence. b. name equivalence (student's answer may vary) each type declaration introduces a new type, distinct from all others Example: TYPE T1 = ARRAY [Qse10] OF CHAR; TYPE T2 = ARRAY [0w,10] OF CHAR; Types T1 and T2 are not equivalent. Java and Ada use name equivalence. c. declaration equivalence (student's answer may vary) two types are equivalent if they lead back to the same type. Example: TYPE T1 ARRAY 010] OF CHAR YEE Y0a.:101 or ceAr! TYPE T2 = T1; TYPE T3 T2 ; TYPE T4 = ARRAY [lae10] OF CHAR; Types T1, T2, T3 are equivalent. Pascal, Modula-2 use declaration equivalence

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!