View Mode
Q: 6
What happens when you attempt to compile and run the following code? #include #include using namespace std; template class A { T_v; public: A() {} A(T v): _v(v){} T getV() { return _v; } void add(T & a) { _v+=a; } void add(string & a) { _v.insert(0, a); } }; int main() { Aa("Hello"); string s(" world!"); a.add(s); cout << a.getV() <<endl; return 0; }
Options
Question 6 of 30

Premium Access Includes

  • Quiz Simulator
  • Exam Mode
  • Progress Tracking
  • Question Saving
  • Flash Cards
  • Drag & Drops
  • 3 Months Access
  • PDF Downloads
Get Premium Access
Scroll to Top

FLASH OFFER

Days
Hours
Minutes
Seconds

avail 10% DISCOUNT on YOUR PURCHASE