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.
You might also like to view...
Explain why payroll is an example of a function that can be run from a cold site.
What will be an ideal response?
Loadable kernel modules are important because ________.
a) they impose a modular structure on the Linux kernel b) they can reduce the kernel’s memory footprint c) they allow modifications to the kernel without recompiling the kernel d) b and c only
An absolute cell reference is used when you want a reference to a particular cell to change when copied
Indicate whether the statement is true or false
To make your presentation easy to access and understand you may have to change, reformat, or update your content
Indicate whether the statement is true or false