Common Jobs

IBM Assessment

1 / 80

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

Youtube Channel Subscribe Now

2 / 80

2. The clause(s) that every SQL Server query must have is/are 

3 / 80

3. Statement: A severe drought is reported in many states of the country.
Courses of action;

  1. The government should immediately provide financial assistance to the people of the affected states.
    II. The government should immediately send food, water, and fodder to the affected states to save people and livestock.

4 / 80

4. Rollback and Commit affect 

5 / 80

5. Consider the following piece of code. What will be the space required for this code? 

int sum(int A[], int n) {    

int sum = 0, i;    

for(i = 0; i < n; i++)       

sum = sum + A[i];    

return sum; } // sizeof(int) = 2 bytes 

6 / 80

6.  Which number would fill the empty space in the series; 4, 7, 12, 19, _, 39?

7 / 80

7. What will be the output of the following pseudo code? 

For input a=8 & b=9. 

Function(input a,input b)               

If(a<b)                             

return function(b,a)               

elseif(b!=0)                              

return (a+function(a,b-1))               

else                              

return 0 

8 / 80

8. Integer a, b, c

Set c = 12, b = 4

a = c / b

c = b >> a

Print c

9 / 80

9. The element at the root of heap is 

10 / 80

10. Peter is facing north. He turns to his right and walks 20 m and then turns to his left and walks 25 m. He then walks 25 m to his right. Next, he walks 50 m to his right. Finally, he turns to his right and walks 30 m. In which direction is he from the starting point?

11 / 80

11. A 20 liter mixture contains 30% alcohol and 70% water. If 5 liters of water is added to the mixture, what will be the percentage of alcohol in the new mixture ?

12 / 80

12. What is the output of this C code?

#include <stdio.h>

int main(){

int i= 0, j = 0;

while (I1: i < 2)

{

I++;

while (j < 3)

{

printf("loop\n");

goto I1;

}

}

}

13 / 80

13. System event triggers are always 

14 / 80

14. What will be the output of the following pseudo code? 

Input f=6,g=9 and set sum=0 

Integer n 

if(g>f) 

for(n=f;n<g;n=n+1) 

sum=sum+n 

End for loop 

else 

print error message 

print sum

15 / 80

15. Which of the following lines in the PL/SQL source code will return an error? 

16 / 80

16.  Default Interceptors of struts 2 are 

17 / 80

17. What will be the value of t if a = 56 , b = 876? 

Read a,b 

Function mul(a, b) 

t = 0 

while (b != 0) 

t = t + a 

b=b-1 

End While 

return t; 

End Function

18 / 80

18. Predict the output of this pseudo-code. 

Integer p, q, r, s 

Set p = 4, q = 2, r = 1 

s = (p AND q) OR (r + 1) 

Print s

19 / 80

19. Two trains of length 125 meters and 115 meters are running on parallel tracks. When they run in the same direction the faster train crosses the slower train in 30 seconds and when they run in opposite direction they cross each other in 10 seconds. What is the speed of each train?

20 / 80

20. Predict the output of the following pseudo-code if x= 1 and y=2: 

Integer solve(int x, int y) 

if(x > 1) 

  solve(x – 1, y + 3) 

end if 

print y 

End function solve()

21 / 80

21.  Which of the following is not the required condition for binary search algorithm?

22 / 80

22. What will be the output if limit = 6? 

Read limit n1 = 0, n2= 1, n3=1, count = 1; 

while  count <= limit 

count=count+1 

print n3 

n3 = n1 + n2 

n1 = n2 

n2 = n3 

End While 

23 / 80

23. Both processes (the parent and the child) continue execution at the instruction after the fork(), with one difference: the return code for the fork() is ______ for the new (child) process, whereas the _____ process identifier of the child is returned to the parent.

24 / 80

24. A bottle of whisky contains 40% alcohol. If we replace a part of this whisky by another whisky containing 20% alcohol, the percentage of alcohol becomes 28%. What quantity of whisky is replaced?

25 / 80

25. Which of the following trigger types will be impacted by constraining factors brought on by mutating tables? 

26 / 80

26.  In the morning, after sunrise, Ramesh and Suresh were talking to each other face to face at Rajnigandha crossing. If Suresh's shadow was exactly to the right of Ramesh, which direction Suresh was facing?

27 / 80

27. Look at the series, 46, 44, 40, 38, 34, _, which number should come next?

28 / 80

28. There are the following statements that are given below, which of them are correct about Regular expressions in the Linux operating system? 

  1. The regular expressions are strings that are used for pattern matching in some Linux commands. 
  2. The regular expressions are also known as a regex. 
  3. The regular expressions use some characters that each has a different meaning. 
  4. Regular expressions can only be used in the Linux commands. 

29 / 80

29. The memory address of fifth element of an array can be calculated by the formula

30 / 80

30. What will be the value of s if n=127? 

Read n 

i=0,s=0 

Function Sample(int n) 

while(n>0) 

r=n%l0 

p=8^i 

s=s+p*r 

i++ 

n=n/10

End While 

Return s; 

End Function

31 / 80

31. Tom walked 10 m towards north then turned right and walked 25 m. Then he turned right and walked 30 m. Now he turned left and walked 10 m. Finally, he turned left and walked 20 m. How far and in which direction is he from the starting point?

32 / 80

32. In UNIX, the set of masked signals can be set or cleared using the ________ function.

33 / 80

33. When the operating system has performed a_____ operation, it has two choices for selecting a process either admitting a newly created process or bring in a previously suspended process.

34 / 80

34. Code to sort given array in ascending order: 

Read size 

Read a[1],a[2],…a[size] 

i=0 

While(i<size) 

j=i+1       

While(j<size)                    

If a[i] < a[j] then            

t= a[i]; 

a[i] = a[j]; 

a[j] = t; 

End If 

j=j+1 

End While 

i=i+1 

End While 

i=0 

While (i<size) 

print a[i] 

i=i+1 

End While 

wrong statement?

35 / 80

35. Which line in the following statement will produce an error?

36 / 80

36. Predict the output of the following pseudocode.

Integer value, n

Set value = 1, n = 45

while(value less than equal to n)

  value = value << 1

end loop

Print value

37 / 80

37. A developer would like to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LASTNAME, respectively. How would the developer define this variable using referential datatypes? 

38 / 80

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

 Integer value, n 

Set value = 32, n = 1 

while(value greater than equal to n) 

  value = value >> 1 

end loop 

Print value

39 / 80

39. A 60 liter mixture of milk and water contains 10% water. How much water must be added to make water 20% in the mixture?

40 / 80

40.  Mukesh left for his office in his car. He travelled 5 km towards the North and then 10 km towards the East. He then travelled 3 km towards the South. Further, he turned to the West and travelled 2 km. Finally, he turned towards the South and travelled 2 km. How far and in which direction is he from the starting point?

41 / 80

41. In which of the following Algorithm where the reference bit is used to determine whether a page has been recently referenced, and some page that has not been recently referenced is replaced? 

42 / 80

42. A shopkeeper mixes 60 kg of sugar worth Rs. 30 per kg with 90 kg of sugar worth Rs. 40 per kg. At what rate he must sell the mixture to gain 20%?

43 / 80

43.  What will be the output of the following pseudo code? 

Input m=9,n=6 

m=m+1 

N=n-1 

m=m+n 

if (m>n)     

print m 

else     

print n 

44 / 80

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

Initialize Integer x, y, z

Set y = 1, x = 2

z = x & y

Print z

45 / 80

45.  Which of the following of beans would survive a server crash 

46 / 80

46. A train moving at 50 km/hr crosses a bridge in 45 seconds. The length of train is 150 meters. Find the length of the bridge.

47 / 80

47. Consider a table TAB with a single row NAME CHARRIS Then, the query SELECT SUBSTR(Name,-3) FROM TAB gives 

48 / 80

48.  Which statement is correct. 

49 / 80

49. A binary tree can easily be converted into q 2-tree 

50 / 80

50. A train of length 100 meters is moving at a speed of 70 km/hr. In what time it will cross a man who is walking at 10 km/hr in the same direction?

51 / 80

51. Two trains running in opposite direction cross a man standing on the platform in 36 seconds and 26 seconds respectively. The trains cross each other in 30 seconds. What is the ratio of their speeds?

52 / 80

52. When representing any algebraic expression E which uses only binary operations in a 2-tree, 

53 / 80

53. The RAISE_APPLICATION_ERROR( ) procedure defines errors returned in which of the following numeric ranges?

54 / 80

54. What is the difference between doing an include or a forward with a RequestDispatcher?

55 / 80

55. Value of (256)0.16 x (256)0.09 is

56 / 80

56. Which of the following command is used to display only directories that exist in the current directory?

57 / 80

57. Consider a table OLD with few rows. The statement CREATE TABLE new AS SELECT * FROM OLD WHERE 1=2 

58 / 80

58.  A variable P is called pointer if 

59 / 80

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

60 / 80

60. What are the missing numbers in this series, 15, 20, 24, 15, 28, 32 15, _, _, 15?

61 / 80

61. What will be the output if limit = 6? 

Read limit n1 = 0, n2= 1, n3=1, count = 1; 

while  count <= limit 

count=count+1

print n3 

n3 = n1 + n2 

n1 = n2 

n2 = n3 

End While 

62 / 80

62. 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

63 / 80

63. The space factor when determining the efficiency of algorithm is measured by

64 / 80

64. In most cases, if a process is sent a signal while it is executing a system call :

65 / 80

65. Which of the following statements are true about locating or using the home interface of a session bean

66 / 80

66. Which of the following statements are correct about the status of the Http response.

67 / 80

67. Command used to check shared memory is 

68 / 80

68. The advantage of link list over array is 

69 / 80

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

70 / 80

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

71 / 80

71. Which class is used to check spring lifecycle? 

72 / 80

72. Suresh walks 18 km from his house to the North. Then he turns towards the East and covers 12 km. He then turns towards the South and covers 6 km. Finally, he turns towards the West and covers 12 km. In which direction is he from his house?

73 / 80

73. A graph is said to be a tree, if it satisfies which of the properties: 

74 / 80

74.  What will be the value of even_counter if number = 2630? 

Read number 

Function divisible(number) 

even_counter = 0, num_remainder = number; 

while (num_remainder) 

digit = num_remainder % 10; 

if digit != 0 AND number % digit == 0 

even_counter= even_counter+1 

End If 

num_remainder= num_remainder / 10; 

End While 

return even_counter; 

75 / 80

75. Statement: Due to repeated crop failures, the villagers are facing financial problems and migrating to urban areas.
Courses of action;

  1. The government should provide villagers alternate source of income so that their income is not affected by crop failure.
    II. The government should provide jobs to the migrated villagers.

76 / 80

76. 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

77 / 80

77.  ___________ is a block of java code in JSP that is used define class-wide variables and methods in the generated class file

78 / 80

78. Consider the below given fragment of code.

int f(int &x, int c) {

c = c - 1;

if (c == 0) retum 1;

x = x + 1;

return f(x, c) * x;

}

In above program the first parameter is passed by reference and the second parameter is passed by value. If the value of p = 5 before the call then what is the value that returned by f(p, p)?

79 / 80

79. A train of length 150 meters running at 100 km/hr. It crosses another train which is moving in opposite direction at 80 km/hr in 8 seconds. Find the length of the other train.

80 / 80

80.  sendRedirect() method is invoked on ________ . 

Your score is

The average score is 32%