Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++: 1) Analyze the given programs and write the output. 1 Presents the correct output of the program clearly and concisely in an organized

In c++:

1) Analyze the given programs and write the output.

1

Presents the correct output of the program clearly and concisely in an organized manner

2

Presents the output fairly clearly and concisely, and may have minor problems such as spacing

3

Presents the unclear output, and/or has significant organization problems such as spacing, spelling etc.

4

Presents half of the output with minor error such as spacing, spelling.

int main()

{

int m[]= { 1, 2, 3, 4, 5,6,7,8,10 };

int n[10];

for(int i=0;i<10 ; i++)

n[i]= m[i]+3;

for( int i=10 ; i>=0 ; i--)

cout<<(n[i]);

}

Answer :

int main()

{

int a[];

for(int k=0;k<10;k++)

{

a[k]= k * 3;

}

for( int i=10 ; i>=0 ; i--)

cout<<(k[i]);

}

Answer :

2) Analyze the given programs and write the output.

1

Presents the correct output of the program clearly and concisely in an organized manner

2

Presents the output fairly clearly and concisely, and may have minor problems such as spacing

3

Presents the unclear output, and/or has significant organization problems such as spacing, spelling etc.

4

Presents half of the output with minor error such as spacing, spelling.

class rec

{ int len;

int wid;

public:

rec();

rec(int d);

rec( int b, int d);

void area()

{ int j;

j=len*wid ;

cout<<"the area is"<

}

};

rec::rec()

{

len=6;

wid= 5;

}

rec:: rec(int y)

{ len=y;

wid= 7;

}

rec:: rec(int y, int r)

{ len=y;

wid= r;

}

int main()

{ rec e;

rec p(5);

rec f(10 ,2);

p.area();

return 0;

}

Answer?

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions