What is the meaning of the following declaration? (Choose two.)
char **ptr;
Which code line inserted instead of the comment below will fix the program so that it produces the expected output and does not cause any memory leak?
Which code line instead of the comment below will cause the program to produce the expected output?
What happens when you attempt to compile and run the following code?
#include
using namespace std;
int main()
{
int i = 4;
while(i >= 0) {
cout<
i??;
}
return 0;
}
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class complex{
double re;
double im;
public:
complex() : re(1),im(0.4) {}
bool operator==(complex &t);
};
bool complex::operator == (complex &t){
if((this?>re == t.re) && (this?>im == t.im))
return true;
else
return false;
}
int main(){
complex c1,c2;
if (c1==c2)
cout << "OK";
else {
cout << "ERROR";
}
}