What happens when you attempt to compile and run the following code?
#include
using namespace std;
class A {
public :
void print() {
cout << "A ";
}
};
class B {
public :
void print() {
cout << "B ";
}
};
int main() {
B sc[2];
B *bc = (B*)sc;
for (int i=0; i<2;i++)
(bc++)->print();
return 0;
}
Eugene
2 months agoProvidencia
23 days agoProvidencia
1 months agoLeah
2 months agoGerald
2 months agoGwenn
2 months agoHorace
2 months agoIluminada
2 months agoElenor
2 months agoIlene
2 months agoVanesa
2 months agoFrancine
2 months agoRaina
2 months agoEarleen
2 months agoFrancine
3 months agoSerina
3 months ago