1. A system program that brings together separately compiled modules of a program into a form language that is suitable for execution.
a) Assembler
b) Linking loader
c) Cross compiler
d) None of the mentioned
Explanation: A loader which brings together the functions of a relocating loader with the ability to combine a number of program segments that have been independently compiled into an executable program.
2. A programmer by mistakes writes a program to multiply two numbers instead of dividing them, how can this error be detected?
a) Compiler
b) Interpreter
c) Compiler or interpreter
d) None of the mentioned
Explanation: This is a logical error that can’t be detected by any compiler or interpreter.
3. A regular expression enables a quick test to determine objects and text strings with undependable values.
a) True
b) False
Explanation: Because it checks for all the values and determines whether the output string matches with the given string.
4. RE can be used only for values of type string and number.
a) True
b) False
Explanation: No not for all values the string and numbers can we use the RE.
5. You can use RE, if you expect the value of a property to change in an unpredictable way each time its run.
a) True
b) False
Explanation: For every cycle the values does not change unpredictably because the type of grammar that it accepts is defined.
6. All ___________ are automatically treated as regular expressions.
a) Programmatic description
b) Window
c) Win Object
d) Collection
Explanation: The programmatic description is genuinely treated as regular expression.
7. If a ‘/’ is used before a character that has no special meaning, ‘/’ is ignored.
a) True
b) False
Explanation: The backslash carries no significance and it is ignored.
8. The regular expression denotes a language comprising all possible strings of even length over the alphabet (0, 1).
a) 1 + 0(1+0)*
b) (0+1) (1+0)*
c) (1+0)
d) (00+0111+10)*
Explanation: Option 1 + 0(1+0)* → It does not consider even length criteria for the question.
Option (0+1) (1+0)* → It can so happen here that from the former bracket it takes 0 or 1 and takes null from the latter then it forms a string of odd length
Option (1+0) → It gives either 1 or 0.
Hence Option (00+0111+10)* is the answer.
9. The RE gives none or many instances of an x or y is?
a) (x+y)
b) (x+y)*
c) (x* + y)
d) (xy)*
Explanation: Whether x or y is denoted by x+y and for zero or more instances it is denoted but (x+y)*.
10. The RE in which any number of 0′s is followed by any number of 1′s followed by any number of 2′s is?
a) (0+1+2)*
b) 0*1*2*
c) 0* + 1 + 2
d) (0+1)*2*
Explanation: The order for the desired string is 012 and for any number of 0s we write 0* for any number of 1s we denote it by 1* and similarly for 2*.Thus 0*1*2*.