ISRO Scientist/Engineer Question Paper Computer Science 2018

6. Question

A data driven machine is one that executes an instruction if the needed data is available. The physical ordering of the code listing does not dictate the course of execution. Consider the following pseudo-code
(A) Multiply E by 0.5 to get F     (B)  Add A and B to get E
(C) Add B with 0.5 to get D       (D)  Add E and F to get G
(E) Add A with 10.5 to get C
Assume A, B, C are already assigned values and the desired output is G. Which of the following sequence of execution is valid?

7. Question

Assume A and B are non-zero positive integers. The following code segment
while ( A != B ){
If ( A> B )
A -= B ;
B -= A ;
cout<<A; // printing the value of A

8. Question

A language with string manipulation facilities uses the following operations.
head(s)- returns the first character of the string s
tail(s) – returns all but the first character of the string s
concat(s1, s2) – concatenates string s1 with s2.
The output of concat(head(s), head(tail
head(tail(tail(s)))) , where s is acbc is

9. Question

In the diagram above, the inverter (NOT gate) and the AND-gates AND gates labeled 1 and 2 have delays of 9, 10 and 12 nanoseconds(ns), respectively. Wire delays are negligible. For certain values of a and c, together with certain transitions of b, a glitch (spurious output) is generated for a short time, after which the output assumes its correct value. The duration of the glitch is

10. Question

Which of the following comparisons between static and dynamic type checking is incorrect?