Which of the following is true in Java?
![]()
Practice OOPS Concepts –
Which of the following is true in Java?
Which of the following is true in Java?
![]()
Practice OOPS Concepts –
Which of the following is true in Java?
![]()
Practice OOPS Concepts –
What is the output of following program?
#include <iostream>
using namespace std;
class Player
{
private:
int id;
static int next_id;
public:
int getID() { return id; }
Player() { id = next_id++; }
};
int Player::next_id = 1;
int main()
{
Player p1;
Player p2;
Player p3;
cout << p1.getID() << " ";
cout << p2.getID() << " ";
cout << p3.getID();
return 0;
}Which of the following is correct about function overloading?
![]()
Practice Functions –
Which of the following is correct about function overloading?
Which of the following approach is adapted by C++?
![]()
Practice Function Overloading –
Which of the following approach is adapted by C++?
Which of the following correctly describes overloading of functions
![]()
Practice Functions –
Which of the following correctly describes overloading of functions?
How many types of polymorphisms are supported by C++?
![]()
Practice Objects and Classes –
How many types of polymorphisms are supported by C++?
cout is a/an __________ .
![]()
Practice Objects and Classes –
cout is a/an __________ .
![]()
Practice Objects and Classes –
What is the output of given code fragment?
int f=1, i=2;
while(++i<5)
f*=i;
cout<<f;
![]()
Practice Function Overloading –
What is the error in the following code?
class t
{
virtual void print();
}
A pure virtual function is a virtual function that
![]()
Practice Function Overloading –
A pure virtual function is a virtual function that
RunTime Polymorphism is achieved by ___________.
![]()
Practice OOPS Concepts –
RunTime Polymorphism is achieved by ___________.
![]()
Practice Objects and Classes –
Consider the following class definitions:
class a
{
};
class b: protected a
{
};What happens when we try to compile this class?
To convert from a user defined class to a basic type, you would mos
![]()
Practice Objects and Classes –
To convert from a user defined class to a basic type, you would most likely use.
A template class
![]()
Practice Objects and Classes –
A template class
The keyword friend does not appear in
![]()
Practice Friend Functions –
The keyword friend does not appear in