Home / MCQ Bank / Computer
Computer Classes And Objects In C Plus Plus Difficulty: Medium

Which is the correct way of concatenating a character at the end of a string object? way 1: string s; s = s + 'a'; way 2: string s; s.push_back('a');

Select the correct option to test your answer:

More Computer Questions

What is the syntax of overloading operator + for class A? Which built-in function is used to convert a value to an integer? What will be the output of the following C++ code? #include <iostream> #include <exception> #include <typeinfo> using namespace std; class Test1 { virtual int Funct() { } }; int main () { try { Test1 * var = NULL; typeid (*var); } catch (std::exception& typevar) { cout << "Exception: " << typevar.what() << endl; } return 0; } Which of the following is used to find variance of all values? The FIFO algorithm