Common Jobs

Common Jobs Logo

Hexaware Quiz

1 / 30

1. What will be the output of the following pseudocode?

Youtube Channel Subscribe Now

Integer x, y, Z, a

Set x=2,y=1,z=5

a = (x AND y) OR (z + 1)

Print a

2 / 30

2. When the ejbRemove method encounters a sysyem problem ,it should throw_________

3 / 30

3. Segment replacement algorithms are more complex than page replacement algorithms because ____________

4 / 30

4. Which of the following describes type-casting in C++ correctly?

5 / 30

5. Which is not a method of HttpServlet?

6 / 30

6. What will be the output of the following class?
class C
{
public static void main(String[] args)
{
String s1 = "Hello";
String s2="India";
String s3=s1+s2;
String s4=s1.concat(s2);
System.out.println(s3==s4);
System.out.println(s3.equals(s4));
}
}

7 / 30

7. What is the output of this program?

#include <stdio.h>

using namespace std;

int main()

{

int a = 5, b=10, c = 15;

int arr[3] = {&a, &b, &c};

cout << *arr[*arr[1] - 8];

return 0;

}

8 / 30

8. What is the right output of this program ?

public class BitwiseNotOperator{
public static void main(String[] args)
{

int i = 50;
System.out.print(~i);
System.out.print(",");
System.out.print(~--i);
System.out.print(",");
System.out.print(~++i);
}
}

9 / 30

9. For B+ trees, which of the following is true?

10 / 30

10. What is the key difference between using a < jsp:forward > and HttpServletResponse.sendRedirect()?

11 / 30

11. Which of the following describes a data structure where deletion can only occur in the opposite direction from the direction of insertion?

12 / 30

12. Predict the output of the following pseudo-code

Integer p, q, r, s Set p = 4, q = 2, r = 1 s = (p AND q) OR (r + 1) Print s

13 / 30

13. What will be the output of the following Java code?
1. class array_output
2. {
3. public static void main(String args[])
4. {
5. int array_variable[][] = {{ 1, 2, 3}, { 4 , 5, 6}, { 7, 8, 9}};
6. int sum = 0;
7. for (int i = 0; i < 3; ++i)
8. for (int j = 0; j < 3 ; ++j)
9. sum = sum + array_variable[i][j];
10. System.out.print(sum / 5);
11. }
12. }

14 / 30

14. Predict the output of the following pseudo-code

Integer a, b, c, d Set b = 10, c = 11 a = b – c for (each c from 2 to a)   b = b + c + 10   b = b/2 end for c = a + b + c Print a b c

15 / 30

15. Which component is responsible for optimizing byte-codes?

16 / 30

16. Choose the correct answer.

17 / 30

17. The page directive is used to convey information about the page to JSP container. Which of these is legal syntax of page directive.

18 / 30

18. The MIME stand for ___________________.

19 / 30

19. Which of the elements defined within the taglib element of taglib descriptor file are required

20 / 30

20. If one thread opens a file with read privileges then:

21 / 30

21.

Predict the output of the following pseudo-code Integer x = 1, y = 2, z = 3 x = y + z z = x – y z = z + x z = y + z y = y + z Print x, y, z

22 / 30

22. Which statement is correct.

23 / 30

23. What will be the output of the following pseudocode for a = 2, b = 3?

doSomething(Integer a, Integer b)

if(b EQUALS 1)

return 0

else

return a+ doSomething(a, b-1)

End function doSomething()

24 / 30

24. What will be the output of below statements?

String s = "Java String Quiz"; System.out.println(s.charAt(s.toUpperCase().length()));

25 / 30

25. What Class.forName will do while loding drivers?

26 / 30

26. Which of the following is not an implicit object ?

27 / 30

27. 7489 IC is a:

28 / 30

28. Predict the output of following C++ program.
#include
using namespace std;
class abc
{
static int x;
public:
abc() { x++; }
static int getX() {return x;}
};
int Test::x = 0;
int main()
{
cout << abc::getX() << " ";
abc t[5]; cout << abc::getX(); }

29 / 30

29. getLastModified method belongs to which interface ?

30 / 30

30. What is the output of this program?

#include <iostream>

#include <deque>

using namespace std;

int main ()

{

deque<int> mydeque (5);

deque<int>::reverse_iterator rit = mydeque.rbegin( );

int i = 0

for (rit = mydeque.rbegin( ); rit!= mydeque.rend( ); ++rit)

*rit = ++i;

for (deque<int> :: iterator it = mydeque.begin( ):

it != mydeque.end( ); ++it)

cout << '' << *it;

return 0;

}

Your score is

The average score is 37%

0%