Podcast
Questions and Answers
What does a pointer point to when it is incremented?
What does a pointer point to when it is incremented?
How is pointer arithmetic generally defined?
How is pointer arithmetic generally defined?
In the given program, what does 'p = &ob;' achieve?
In the given program, what does 'p = &ob;' achieve?
What is the purpose of using '->' in the statement 'cout << p->get_i();'?
What is the purpose of using '->' in the statement 'cout << p->get_i();'?
Signup and view all the answers
What does the statement 'cl ob = {1, 2, 3}' achieve?
What does the statement 'cl ob = {1, 2, 3}' achieve?
Signup and view all the answers
What is the correct way to access a member of a class when given a pointer to an object?
What is the correct way to access a member of a class when given a pointer to an object?
Signup and view all the answers
What character is used to initialize each object in an array when a class defines a parameterized constructor?
What character is used to initialize each object in an array when a class defines a parameterized constructor?
Signup and view all the answers
In C++, how are arrays of objects declared and used?
In C++, how are arrays of objects declared and used?
Signup and view all the answers
If an object's constructor requires multiple arguments, what form of initialization list should be used for arrays of objects?
If an object's constructor requires multiple arguments, what form of initialization list should be used for arrays of objects?
Signup and view all the answers
What does the following code snippet illustrate: cl(int j) { i=j; }
?
What does the following code snippet illustrate: cl(int j) { i=j; }
?
Signup and view all the answers
What does the using namespace std;
statement in C++ indicate?
What does the using namespace std;
statement in C++ indicate?
Signup and view all the answers