TCS Company General Ability General Knowledge

In a hexagon shaped park some trees are to be planted such that each corner has a tree and equal number of trees should be on each side. How many trees would be needed if each side must have six trees?

A. 36
B. 32
C. 34
D. 30

Read Solution (Total 10)

TCS Other Question

We cannot overload _______ operator.

A. ::
B. []
C. ()
D. +
What will be the output?

public class Main
{
public static int main(String args[])
{
int x = 10;
int y = 10;
if (x^y)
System.out.println(" x is equal to y ");
return 0;
}
}

A. Nothing will print
B. Compile time error
C. x is equal to y
D. Runtime Error​