The following program invokes p() three times. What is the printout from the last call of p()?

```
#include
using namespace std;

int j = 40;

void p()
{
int i = 5;

static int j = 5;
i++;
j++;

cout << "i is " << i << " j is " << j << endl;
}

int main()
{
p();
p();
p();
}
```

a. i is 6 j is 6
b. i is 6 j is 7
c. i is 6 j is 9
d. i is 6 j is 8


d. i is 6 j is 8

Computer Science & Information Technology

You might also like to view...

The ____ provides convenient, one-tap or one-click access to frequently used commands.

A. KeyTips toolbar B. Quick Access Toolbar C. mini toolbar D. Microsoft Account Area

Computer Science & Information Technology

A typical computer program follows the pattern of

a. output, processing, input b. input, output, processing c. input, processing, output d. processing, input, output

Computer Science & Information Technology

The three features required for an object-oriented language are class construction, inheritance, and ____.

A. operator overloading B. polymorphism C. abstraction D. encapsulation

Computer Science & Information Technology

A good design keeps the code in the mainline function to a minimum.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology