Question: DESIGN AND IMPLEMENTATION OF PROGRAMMING LANGUAGES JUST I NEED THE ANSWER A OR B OR C OR D OR E PLEASE WITHOUT EXPLAIN OR ANY

DESIGN AND IMPLEMENTATION OF PROGRAMMING LANGUAGES

JUST I NEED THE ANSWER A OR B OR C OR D OR E PLEASE WITHOUT EXPLAIN OR ANY JUST THE ANSWER

Question 21 : Consider the following two program segments: S1 and S2 S1: Base class: class rational { error() { cout

a) Considering S1, A.error()

b) Considering S2: A.error()

c) a and b.

d) In S1 and S2, if error is called, Rational is always printed.

e) none of the mentioned.

DESIGN AND IMPLEMENTATION OF PROGRAMMING LANGUAGES JUST I NEED THE ANSWER A

---------------------------------------------------------------------------------------------------------------------------------

Question 25 : Assuming static scope, the non local referencing environment at statement1 and statement2 for the following program segment are: Main Var X, Y, Z : real procedure M1( X: real); Var D: real begin M1; call N2 (Y); statement1 end M1; procedure N2( C real); Var D, B: real; begin N2; statement2 end N2; begin main; call MI(A); end main

a) At statement1: Main; M1;N2; Y;Z At Statement2 Main;M1; N2;X;Y;Z.

b) At statement1: Main; M1; N2;Y;Z. At statement2 N2;M1;X.

c) a and b.

d) At Statement1: N2; X; B. At statement2: N2;main;Z.

e) None of the mentioned.

OR B OR C OR D OR E PLEASE WITHOUT EXPLAIN OR

001010 111101101 0101010111111 101010101010 11101010101 2101100 Question 21: Consider the following two program segments: S1 and S2 S1: Base class: class rational { error() { cout ];} ... } Derived class: class complex: rational { string name() { return "Complex "> ;} ... } rational A; complex B; S2: Same as S1, but name is defined as: virtual string name() { return " Rational ";} What is the correct answer? a) Considering S1, A.error()

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!