Question: Question 12: Considering the declaration package Rational Number is type rational is private; procedure mult(x in rational; -- y in rational; z out rational); private

Question 12: Considering the declaration package Rational Number is type rational is private; procedure mult(x in rational; -- y in rational; z out rational); private type rational is record num, den: integer end record end package; package body Rational Number is procedure multix in rational; y in rational: z out rational) begin z.num :=x.num. y.num; z.den := x.deny.den; end; end package; a) this declaration constitutes a composite data type. b) this declaration hides but doesn't encapsulate the implementation of rational. c) based on this declaration if we write Var A: rational; then A.num:=7 is illegal. d) all the mentioned. e) none of the mentioned. Question 13: In simple call return mechanism the return address is the pair( CIP, CEP) and is stored in the activation record of the called subprogram a) True. b) False. Question 14 : In Prolog: the clauses: X is 2+3, X=5 and X=2+3, X%3D5 have the different meaning. a) True. b) False. Question 15 : Structured data types in compiled languages: a) Have no direct analog at the hardware level. b) Are software simulated. c) Are purely compiled. d) a and b. e) a and c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
