Correct Answer: both s and g are modifiable pointers to an immutable string
Explanation:
Note: This Question is unanswered, help us to find answer for this one
C++ Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More C++ MCQ Questions
Given this code, what is the output? #include struct shape { void move() { std::cout << 'shape::move\n'; } }; struct circle : public shape { void move() { std::cout << 'circle::move\n'; } }; struct rectangle : public shape { void move() { std::cout << 'rectangle::move\n'; } }; int main() { shape *s; s = new shape(); s->move(); s = new circle(); s->move(); s = new rectangle(); s->move(); return 0; }
std::function<int()> f; f(); f is not initialized. What exception is thrown, when you try to call it?
How do you declare a pointer where the memory location being pointed to cannot be altered, but the value being pointed to can?
Which is not a member of std::weak_ptr?
What will be the output? auto fn = [](unsigned char a){ cout << std::hex << (int)a << endl; }; fn(-1);
C++ provides a header file called ____________________, which is used for file i/o.
The header file is also known as the ____________________.
To use the strlen function in a program, you must also write #include ________.
If you try to add a new item to a full stack, the resulting condition is called a(n) ____.
A function prototype is ____.