About System Programming

Following are some of the multiple choice questions on the System Programming with answers that will help the students in developing their knowledge.

System Programming MCQ

1. Which statement is wrong ?

  • If linked origin ≠ translated origin, relocation must be performed by the linker
  • If load ≠ linked origin, the loader must perform relocation
  • A linker always perform relocation, whereas some loaders do not
  • None of these

2. Which activity is included in the first pass of two pass assemblers?

  • Build the symbol table
  • Construct the intermediate code
  • Separate mnemonic opcode and operand fields
  • All of the above

3. Portable program means

  • Program with wheels
  • Independent from its authors
  • Independent of platform
  • None of these

4. In an absolute loading scheme which loader function is accomplished by assembler?

  • re-allocation
  • allocation
  • linking
  • None of these

5. Which of the following are Assembler Directives?(i) EQU(ii) ORIGIN(iii) START(iv) END

  • (ii), (iii) and (iv)
  • (i), (iii) and (iv)
  • (iii) and (iv)
  • (i), (ii), (iii) and (iv)

6. From the point of view of the programmer, what are the major advantages of using a high-level language rather than internal machine code or assembly language ?

  • Program portability
  • Easy development
  • Efficiency
  • None of these

7. Dead-code elimination in machine code optimization refers to:

  • removal of all labels.
  • removal of values that never get used.
  • removal of function which are not involved.
  • None of these

8. Object code is the output of ……………

  • Operating System
  • Compiler or Assembler
  • only Assembler
  • None of these

9. In compiler design ‘reducing the strength’ refers to

  • reducing the range of values of input variables
  • code optimization using cheaper machine instructions
  • reducing efficiency of program
  • All of above

10. Code optimization is responsibility of:

  • Application programmer
  • System programmer
  • Operating system
  • Both A & B

11. A permanent database of a general model of compiler is...................

  • Identifier table
  • Page map table
  • Literal table
  • Terminal table

12. The scheme of which interpreter translates the source program is known as

  • Paragraph by paragraph
  • Instruction by instruction
  • Line by line
  • Both A & B

13. In a two pass compiler, during the first pass:

  • user defined address symbols are correlated with their binary equivalent
  • the syntax of the statement is checked and mistakes, if any, are listed
  • object program is generated
  • None of these

14. In .............., the bodies of the two loops are merged together to form a single loop provided that they do not make any references to each other.

  • Loop unrolling
  • Strength reduction
  • Loop concatenation
  • Loop jamming

15. Grammar of the programming is checked at …………… phase of compiler.

  • semantic analysis
  • code generation
  • syntax analysis
  • All of above

16. Block or Buffer caches are used to

  • improve disk performance
  • handle interrupts
  • increase the capacity of main memory
  • speed up main memory Read operations

17. Which of the statements related to Compilers is wrong ?

  • Lexical analysis is breaking the input into tokens
  • Syntax analysis is for parsing the phrase
  • Syntax analysis is for analyzing the semantic
  • All of above

18. How many states can a process be in?

  • 2
  • 3
  • 4
  • 5

19. Peep-hole optimization is a form of:

  • loop optimization
  • local optimization
  • constant folding
  • Both A & B

20. The parsing technique that avoids back tracking is:

  • Top-down parsing
  • Recursive-descent parsing
  • Predictive
  • None of these

21. In two pass assembler the symbol table is used to store:

  • Label and value
  • Only value
  • Mnemonic
  • Memory Location

22. Which of the following permanent database that has an entry for each terminal symbol ?

  • Literal table
  • Identifier table
  • Terminal table
  • All of above

23. The ............... transfers the executable image of a C++ program from hard disk to main memory.

  • Compiler
  • Linker
  • Debugger
  • Loader

24. Which activity is not included in the first pass of two pass assembler?

  • build the symbol table
  • construct the intermediate code
  • separate mnemonic opcode and operand field
  • none of these

25. A program P calls two subprograms P1 and P2. P1 can fail 50% times and P2 40% times. Then P can fail

  • 50%
  • 60%
  • 10%
  • 70%

26. When a language has the capability to produce new data types, it is said to be:

  • extensible
  • encapsulated
  • overloaded
  • None of these

27. Loading operating system from secondary memory to primary memory is called...............

  • Compiling
  • Reassembling
  • Refreshing
  • Booting

28. A compiler for a high level language that runs on one machine and produces code for a different machine is called:

  • Optimizing
  • One pass compiler
  • Multipass compiler
  • Cross compiler

29. Which of the following command the file names in multiple columns?

  • IS–X
  • IS
  • IS–1
  • All of above

30. Which of the following are the principles tasks of the linker?I. Resolve external references among separately compiled program units.II. Translate assembly language to machine code.III. Relocate code and data relative to the beginning of the program.IV. Enforce access-control restrictions on system libraries.

  • I and II
  • I and III
  • II and III
  • None of these

31. In compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements is an illustration of operator strength reduction?

  • Replace P + P by 2 * P or Replace 3 + 4 by 7
  • Replace (P
  • Replace P * 0 by 0
  • Replace P * 32 by P

32. The contents of Register (BL) and Register (AL) of 8085 microprocessor are 49H and 3AH respectively. The contents of AL, the status of carry flag (CF) and sign flag (SF) after executing 'SUB AL, BL' assembly language instruction, are

  • AL=0FH; CF=1; SF=1
  • AL=F0H; CF=0; SF=0
  • AL=F1H; CF=1; SF=1
  • None of these

33. Which of the following statement(s) regarding a linker software is/are true?I. A function of a linker is to combine several object modules into a single load module.II. A function of a linker is to replace absolute references in an object module by symbolic references to locations in other modules.

  • Only I
  • Only II
  • Both I and II
  • None of these

34. Which of the following are not regular?(A) Strings of even number of a’s.(B) Strings of a’s, whose length is a prime number.(C) Set of all palindromes made up of a’s and b’s.(D) Strings of a’s whose length is a perfect square.

  • (A) and (B) only
  • (A), (B) and (C) only
  • (B) and (D) only
  • (B), (C) and (D) only

35. A shift-reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of the grammar.S -> xxW[print“1”]S -> y[print“2”]W -> S2[print“3”], what is the translation of “x x x x y z z”?

  • 1 1 2 3 1
  • 1 1 2 3 3
  • 2 3 1 3 1
  • None of these

36. Match the description of several parts of a classic optimizing compiler in List - I, with the names of those parts in List - II:List - I(a) A part of a compiler that is responsible for recognizing syntax.(b) A part of a compiler that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories.(c) A part of a compiler that understand the meanings of variable names and other symbols and checks that they are used in ways consistent with their definitions.(d) An IR-to-IR transformer that tries to improve the IR program in some way (Intermediate representation).List - II(i) Optimizer(ii) Semantic Analysis(iii) Parser(iv) ScannerCode: (a) (b) (c) (d)

  • (iii) (iv) (i) (ii)
  • (iv) (iii) (ii) (i)
  • (ii) (iv) (i) (iii)
  • All of above

37. Consider the following program fragment in assembly language. What is the value of ax and cx registers after the completion of the doloop?

  • ax = FFF5 h and cx = 0 h
  • ax = FFF5 h and cx = 0A h
  • ax = FFF7 h and cx = 0A h
  • ax = FFF6 h and cx = 0 h

38. An example of a compiler-compiler is:

  • JAVA
  • LEX
  • YACC

39. Consider the following assembly program segment. The contents of the destination register ax (in hexadecimal) and the status of Carry Flag (CF) after the execution of above instructions are:

  • ax = 003CH; CF = 0
  • ax = 001EH; CF = 0
  • ax = 007BH; CF = 1
  • All of above

40. Non modifiable procedures are called:

  • Serially usable procedure
  • Concurrent procedure
  • Top down procedure
  • Re-entrant procedure

41. Which is the correct statement(s) for Non Recursive predictive parser?S1: First(α) = {t | α => * t β for some string β } => *tβS2: Follow(X) = { a | S => * αXa β for some strings α and β }

  • Both statements S1 and S2 are incorrect
  • S1 is incorrect and S2 is correct
  • S1 is correct and S2 is incorrect
  • Both statements S1 and S2 are correct

42. The family of context sensitive languages is ................. under union and ................. under reversal.

  • closed, not closed
  • not closed, not closed
  • closed, closed
  • None of these

43. System calls are usually invoked by using:

  • A privileged instruction
  • An indirect jump
  • Polling
  • A software interrupt

44. The principle of Locality of reference justifies the use of:

  • Virtual memory
  • Interrupts
  • Cache memory
  • All of above

45. In a compiler, the task of scanning the source code, to recognize and classify various elements is known as.

  • Code Optimization
  • Syntactic Analysis
  • Lexical Analysis
  • All of above

46. A general macro processor is an in built function of:

  • Loader
  • Linker
  • Editor
  • Assembler

47. The dynamic binding occurs during the:

  • Compile time
  • Run time
  • Linking time
  • Both A & B

48. In which way(s) a macroprocessor for assembly language can be implemented ?

  • Independent two-pass processor
  • Independent one-pass processor
  • Expand macrocalls and substitute arguments
  • All of the above

49. Object modules generated by assembler that contains unresolved external references are resolved for two or more object module by a/an

  • Operating system
  • Loader
  • Compiler
  • Linker

50. If you want to execute more than one program at a time, the systems software that are used must be capable of:

  • word processing
  • virtual memory
  • compiling
  • multitasking

Enjoyed the Quiz. Share this with friends


Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.