2) Given the following class definition, which of the followingis an illegal Pet variable declaration?
class Pet {
Pet();
Pet(string name);
Pet(string breed, stringname);
Pet(int age, stringname);
// rest of class code
};
Select one:
a. Pet myPet(7, “Momo”);
b. Pet myPet(3);
c. Pet myPet(“Tempura”);
d. Pet myPet;
3) What is the output of the following code?
int main() {
string temp = “”;
string result = “”;
string myString = “Joan got an A onthe quiz.”;
istringstream inSS;
inSS.str(myString);
inSS >> temp >>result;
cout << result;
return 0;
}
Select one:
a. Joan
b. got
c. Joan got an A on the quiz.
d. No output. The variable result is an empty string.
11) What is the output of the following code?
int main() {
vector<int> nums;
int i = 0;
nums.push_back(4);
nums.push_back(3);
nums.push_back(2);
nums.push_back(1);
for(i
PayPal Gateway not configured
PayPal Gateway not configured