What is the no. of colours required to colour the given graph?
What is the residual edge? (Edge u->v and reverse edge v->u)
What is the output of this java program?
class string_class
{
public static void main(String args[ ])
{
String obj = "hello";
String obj1 = "world";
String obj2 = "hello";
System.out.println(obj.equals(obj1) + " " + obj.equals(obj2));
}
}
Which statement is correct about the following declaration in C/C++?
int *ptr, p;
Which of the following operators can’t be overloaded in C++?
What is the output of this C++ program?
#include <iostream>
using namespace std;
class sample
{
public:
int x, y;
sample() {};
sample(int, int);
sample operator + (sample);
};
sample::sample (int a, int b)
{
x = a;
y = b;
}
sample sample::operator+ (sample param)
{
sample temp;
temp.x = x + param.x;
temp.y = y + param.y;
return (temp);
}
int main ()
{
sample a (4,1);
sample b (3,2);
sample c;
c = a + b;
cout << c.x << "," << c.y;
return 0;
}
What will be the output of the program?
class MyThread extends Thread
{
public static void main(String [] args)
{
MyThread t = new MyThread();
t.start();
System.out.print("one. ");
t.start();
System.out.print("two. ");
}
public void run()
{
System.out.print("Thread ");
}
}
Which of the following stops execution of a thread?
Construct the binary search tree using the values mentioned below and find the ‘Post order’ of that _________
50,7,80,9,10,100,17,3
In which sequence are the nodes traversed in the post-order traversal in a binary tree?