Data members which are static
![]()
Practice OOPS Concepts –
Data members which are static
Data members which are static
![]()
Practice OOPS Concepts –
Data members which are static
Which of the following operator is overloaded for object cout?
![]()
Practice Objects and Classes –
Which of the following operator is overloaded for object cout?
How “Late binding” is implemented in C++?
![]()
Practice Memory Management –
How “Late binding” is implemented in C++?
Which of the following concepts means waiting until runtime to dete
![]()
Practice Functions –
Which of the following concepts means waiting until runtime to determine which function to call?
Which of the following concepts means wrapping up of data and funct
![]()
Practice Functions –
Which of the following concepts means wrapping up of data and functions together?
Which of the following is correct about class and structure?
![]()
Practice Objects and Classes –
Which of the following is correct about class and structure?
Which of the following statements about a String is correct?
![]()
Practice Functions –
Which of the following statements about a String is correct?
The string built using the String class are immutable (unchangeable
![]()
Practice Functions –
The string built using the String class are immutable (unchangeable), whereas, the ones built- using the StringBuilder class are mutable.
The statement f1.write((char*)obj1, sizeof(obj1));
![]()
Practice References –
The statement f1.write((char*)&obj1, sizeof(obj1));
You can read input that consists of multiple lines of text using
![]()
Practice References –
You can read input that consists of multiple lines of text using
If we create a file by ‘ifstream’, then the default mod
![]()
Practice Memory Management –
If we create a file by ‘ifstream’, then the default mode of the file is ______________.
To perform stream I/O with disk files in C++, you should
![]()
Practice Memory Management –
To perform stream I/O with disk files in C++, you should
What would be the output of the following program ?
![]()
Practice Operator Overloading –
What would be the output of the following program ?
class test {
public static void main(String[] args) {
for(int i=0;i<=args.length;i++);
System.out.println(args[i]);
}
}
![]()
Practice Operator Overloading –
Predict the output of following program.
#include<iostream>
using namespace std;
class Test
{
private:
static int count;
public:
Test& fun();
};
int Test::count = 0;
Test& Test::fun()
{
Test::count++;
cout << Test::count << " ";
return *this;
}
int main()
{
Test t;
t.fun().fun().fun().fun();
return 0;
} ![]()
Practice OOPS Concepts –
What is the output of following program?
#include <iostream>
using namespace std;
class A
{
private:
int x;
public:
A(int _x) { x = _x; }
int get() { return x; }
};
class B
{
static A a;
public:
static int get()
{ return a.get(); }
};
int main(void)
{
B b;
cout << b.get();
return 0;
}