Question
C++ Questions : 1. Having a member function defined as int f1(int x, int y) const means: A. The function f1 cannot change x or
C++ Questions :
1. Having a member function defined as int f1(int x, int y) const means:
A. The function f1 cannot change x or y
B. The function f1 cannot return a value that is based on calculations of class member variables
C. The function f1 cannot change the class member variables
D. The function f1 cannot change any value iniside, it only returns
2. For which type of class private and protected members of the class can be accessed from outside the same class in which they are declared
A. No such class exist
B. Friend
C. Static
D. Virtual
3. Inside a function definition for a member function of an object with data element x, which of the following is equivalent to this->x:
A. (*this).x
B. *this->x
C. x
D. Both A and C are correct
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started