Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Which one of the following options represents the output of the program below? struct MyBox { int length, breadth, height; } ; void dimension (

Which one of the following options represents the output of the program below?
struct MyBox { int length, breadth, height; };
void dimension (MyBox M){ cout << M.length <<"x"<< M.breadth <<"x"; cout << M.height << endl; }
int main (){ MyBox B1={10,15,5}, B2, B3; ++B1.height; dimension(B1); B3= B1; ++B3.length; B3.breadth++; dimension(B3); B2= B3; B2.height +=5; B2.length--; dimension(B2);
return 0; }
a.
10x15x5
11x16x6
10x16x11
b.
10x5x6
11x16x6
10x16x11
c.
10x15x6
11x16x6
10x5x11
d.
10x15x6
11x16x6
10x16x11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions

Question

Are there any disadvantages to this tactic?

Answered: 1 week ago

Question

Who is the assigned manager for each tactic?

Answered: 1 week ago