Shift-Reduce parsers perform the following :
A. | Shift step that advances in the input stream by K(K > 1) symbols and Reduce step that applies a completed grammar rule to some recent parse trees, joining them together as one tree with a new root symbol. |
B. | Shift step that advances in the input stream by one symbol and Reduce step that applies a completed grammar rule to some recent parse trees, joining them together as one tree with a new root symbol. |
C. | Shift step that advances in the input stream by K(R = 2) symbols and Reduce step that applies a completed grammar rule to form a single tree. |
D. | Shift step that does not advance in the input stream and Reduce step that applies a completed grammar rule to form a single tree. |
Option: B Explanation : Click on Discuss to view users comments. |
A computer program selects an integer in the set {k : 1 < k < 10,00,000} at random and prints out the result. This process is repeated 1 million times. What is the probability that 'he value k = 1 appears in the printout atleast once?
A. | 0.5 |
B. | 0.704 |
C. | 0.632121 |
D. | 0.68 |
Option: C Explanation : Click on Discuss to view users comments. |
When an array is passed as parameter to a function, which of the following statements is correct?
A. | The function can change values in the original array. |
B. | In C, parameters are passed by value, the function cannot change the original value in the array. |
C. | It results in compilation error when the function tries to access the elements in the array. |
D. | Results in a run time error when the function tries to access the elements in the array. |
Option: A Explanation : When array name is passed as an argument, it pass only as a reference (ie address of first element) so the ans is A Click on Discuss to view users comments. |
In a classful addressing, first four bits in Class A IP address is
A. | 1010 |
B. | 1100 |
C. | 1011 |
D. | 1110 |
Option: A Explanation : Click on Discuss to view users comments. |
Which of the following conditions does not hold good for a solution to a critical section problem?
A. | No assumptions may be made about speeds or the number of CPUs. |
B. | No two processes may be simultaneously inside their critical sections. |
C. | Processes running outside its critical section may block other processes. |
D. | Processes do not wait forever to enter its critical section. |
Option: A Explanation : Click on Discuss to view users comments. Muthu Mariyappan said: (4:52pm on Monday 29th December 2014)
d
|