Common Jobs

Common Jobs Logo

IBM Assessment

1 / 80

1. 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?

2 / 80

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

3 / 80

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

4 / 80

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

5 / 80

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

6 / 80

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

7 / 80

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

8 / 80

8. 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()

9 / 80

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

10 / 80

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

11 / 80

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

12 / 80

12. Command used to check shared memory is 

13 / 80

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

14 / 80

14.  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?

15 / 80

15. 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?

16 / 80

16. 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?

17 / 80

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

18 / 80

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

19 / 80

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

20 / 80

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

21 / 80

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

22 / 80

22. 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? 

23 / 80

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

24 / 80

24.  sendRedirect() method is invoked on ________ . 

25 / 80

25.  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?

26 / 80

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

27 / 80

27. 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? 

28 / 80

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

29 / 80

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

30 / 80

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

31 / 80

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

32 / 80

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

33 / 80

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

34 / 80

34. Rollback and Commit affect 

35 / 80

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

36 / 80

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

37 / 80

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

38 / 80

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

39 / 80

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

40 / 80

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

41 / 80

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

42 / 80

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

43 / 80

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

44 / 80

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

45 / 80

45. 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?

46 / 80

46. The advantage of link list over array is 

47 / 80

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

48 / 80

48. 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?

49 / 80

49. 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?

50 / 80

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

51 / 80

51. 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;

}

}

}

52 / 80

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

53 / 80

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

Initialize Integer x, y, z

Set y = 1, x = 2

z = x & y

Print z

54 / 80

54. 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?

55 / 80

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

56 / 80

56. 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%?

57 / 80

57. Which class is used to check spring lifecycle? 

58 / 80

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

59 / 80

59. System event triggers are always 

60 / 80

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

61 / 80

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

62 / 80

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

63 / 80

63. Integer a, b, c

Set c = 12, b = 4

a = c / b

c = b >> a

Print c

64 / 80

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

65 / 80

65. The element at the root of heap is 

66 / 80

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

67 / 80

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

68 / 80

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

69 / 80

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

70 / 80

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

71 / 80

71.  Which statement is correct. 

72 / 80

72.  A variable P is called pointer if 

73 / 80

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

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. 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)?

76 / 80

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

77 / 80

77. 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?

78 / 80

78. 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 ?

79 / 80

79.  Default Interceptors of struts 2 are 

80 / 80

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

Your score is

The average score is 29%