Which algorithm is used to solve a maximum flow problem?
What is the no. of colours required to colour the given graph?
What will be the output of the following java code?
import java.util.*;
class Main
{
public static void main(String[] args)
{
ArrayList obj = new ArrayList();
for(int i=1;i<=5;i++)
obj.add(i);
obj.remove(3);
System.out.println(obj);
}
}
What will be the output of this java program?
class PassA
{
public static void main(String [] args)
{
PassA p = new PassA();
p.start();
}
void start()
{
long [] a1 = {3,4,5};
long [] a2 = fix(a1);
System.out.print(a1[0] + a1[1] + a1[2] + " ");
System.out.println(a2[0] + a2[1] + a2[2]);
}
long [] fix(long [] a3)
{
a3[1] = 7;
return a3;
}
}
#include<iostream>
using namespace std;
class XYZ
{
public:
int x;
};
int main()
{
XYZ a = {20};
XYZ b = a;
cout << a.x << " " << b.x;
return 0;
}
Which of these is correct way of calling a constructor having no parameters, of superclass A by subclass B?
Which of the following operators should be preferred to overload as a global function rather than a member method?
Which of the following statements is NOT valid about operator overloading?
What will be the output of this C program ?
#include<stdio.h>
int main()
{
char str[ ] = "Hello\0World";
printf("%s", str);
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
char *a="Perfectice";
printf("%d",sizeof(a));
return 0;
}