What is the printout of the following code?

```

#include
using namespace std;

class Count
{
public:
int count;

Count(int c)
{
count = c;
}

Count()
{
count = 0;
}
};
void increment(Count c, int& n)
{
c.count++;
n++;
}

int main()
{
Count myCount;
int n = 0;

for (int i = 0; i < 100; i++)
increment(myCount, n);

cout << "myCount.count is " << myCount.count;
cout << " n is " << n;

return 0;
}
```

a. myCount.count is 0 n is 0
b. myCount.count is 100 n is 100
c. myCount.count is 0 n is 100
d. myCount.count is 100 n is 0


c. myCount.count is 0 n is 100

Computer Science & Information Technology

You might also like to view...

What numbers are displayed in the list box by the following program segment?

``` Dim numbers() As Integer = {5, 79, 8, 33, 27} Dim query = From number in numbers Let formattedNum = number.ToString("N0") Order By formattedNum Ascending Select formattedNum lstBox.DataSource = query.ToList lstBox.SelectedIndex = Nothing ``` (A) 5, 8, 27, 33, 79 (B) 79, 33, 27, 8, 5 (C) 27, 33, 5, 79, 8 (D) 5, 79, 8, 33, 27

Computer Science & Information Technology

Investigate some other operating systems such as Mac OS X and Windows XP. How do they compare to Linux?

What will be an ideal response?

Computer Science & Information Technology

Explain how computer art is dervitive and not creative.

What will be an ideal response?

Computer Science & Information Technology

Which of the following is accomplished by running the disk defragmenter on a hard drive?

A. Drive is checked for errors B. Ensures that file sectors are contiguous C. Additional memory is released for use D. Master boot record is updated

Computer Science & Information Technology