What is wrong in the following code?

```
#include
using namespace std;

class TempClass
{
public:
int i;

TempClass()
{
int i = 5;
}
};

int main()
{
TempClass temp(2);
}
```

a. The program compiles fine, but it does not run because class C is not public.
b. The program has a compilation error because TempClass does not have a default constructor.
c. The program compiles and runs fine.
d. The program has a compilation error because TempClass does not have a constructor with an int argument.


d. The program has a compilation error because TempClass does not have a constructor with an int argument.

Computer Science & Information Technology

You might also like to view...

A(n) ____ is software that can automate a task or autonomously execute a task when commanded to do so.

A. zombie B. intelligent agent C. botmaster D. RAT

Computer Science & Information Technology

Lion is used to run ____ software.

A. operating B. tracking C. application D. vision

Computer Science & Information Technology

Considering the following code, explain in detail what CSS inheritance is:

What will be an ideal response?

Computer Science & Information Technology

A report is more meaningful if its data is ________ and sorted

Fill in the blank(s) with correct word

Computer Science & Information Technology