FPL-II

| Time: *:* | 1 Question(s) Per Page

1/16
[Multiple Choice] 1.      What is the output of this program?

1.  #include <iostream>

2.      using namespace std;

3.      class rect

4.      {

5.          int x, y;

6.          public:

7.          void val (int, int);

8.          int area ()

9.          {

10.            return (x * y);

11.        }

12.    };

13.    void rect::val (int a, int b)

14.    {

15.        x = a;

16.        y = b;

17.    }

18.    int main ()

19.    {

20.        rect rect;

21.        rect.val (3, 4);

22.        cout << "rect area: " << rect.area();

23.        return 0;

24.    } (1 Point)
  1. rect area:12

  2. rect area:24

  3. none of the mentioned
  4. rect area: 14

Pages: 1/16

Questions List