Which statement should be added in the following program to make work it correctly?
using namespace std;
int main (int argc, const char * argv[])
{
cout
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
int main()
{ string s1[]= {"How" , "to" };
s1[0].swap(s1[1]);
for (int i=0; i
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class A {
public:
int x;
A() { x=0;}
A(int x) { this?>x=x;}
};
class B : private A {
public:
using A::x;
B() { x=1;}
B(int x) {this?>x = x;}
};
int main () {
B c1;
B c2(?5); cout