Top Banner
Model Question Paper Subject Code: MC0073 Subject Name: System-Programming Credits: 4 Marks: 140 Part A (One mark questions) 1 . Semantic gap between two specifications of the same task is called …………. a. Specification gap b. Execution gap c. both a and b d. semantic gap 2. The gap between the semantics of programs (that perform the same task) written in different programming languages is called ………… a. Specification gap b. Execution gap c. both a and b
35
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: MC0073 System Programming

Model Question Paper

Subject Code: MC0073

Subject Name: System-Programming

Credits: 4 Marks: 140

Part A (One mark questions)

1 . Semantic gap between two specifications of the same task is called

………….

a. Specification gap

b. Execution gap

c. both a and b

d. semantic gap

2. The gap between the semantics of programs (that perform the

same task) written in different programming languages is called

…………

a. Specification gap

b. Execution gap

c. both a and b

Page 2: MC0073 System Programming

d. semantic gap

3. A translators that transforms the programming language into a simplified

language is called………………..

a. intermediate code

b. executable code

c. low level language

d. high level language

4. If the source language is assembly language, and the target language is machine language, then

the translator is called ………………...

a. Assembler.

b. Compiler

c. Interpreter.

d. both a and b

Page 3: MC0073 System Programming

5. A set of programs that organize, utilize and control hardware in a computer system is called …………….

a. graphics software

b. utility software

c. System software

d. application software

6. To represent a single character, computer uses the …………..

a. single word

b. Single bit

c. Single byte

d. both a and b

7. The code called ASCII (pronounced "AS-key"), which stands for ………….

a. American Standard Code for Information Interchange

b. American Standard computer for Information Interchange

c. American Standard Code for Internal Information

d. American Standard Code for Information Intervals

Page 4: MC0073 System Programming

8. The address (in either the "short" 16-bit form or "long" 32-bit form) of the operand immediately follows the instruction, which type of addressing mode it is?

a. Immediate mode

b. Address register indirect

c. Absolute address

d. Register direct

9. An assembly language is a machine dependent, Programming language.

a. low level

b. high level

c. Middle level

d. java

11. Each imperative statement typically translates into ………....

a. one machine instruction

10. The condition code can be tested by a Branch on Condition (BC) instruction. The assembly statement corresponding to it has the format………………

a. BC <condition code spec>, <register address>

b. BC <memory address>

c. BC <condition code spec>, <memory address>

d. BC <condition code spec>

Page 5: MC0073 System Programming

b. two machine instruction

c. three machine instruction

d. one programming instruction

12. Assembler directives …………………. to perform certain actions during the assembly of a program

a. instruct the assembler

b. instruct the compiler

c. Instruct the Parser

d. force the lexical analyzer

13. Many assemblers have built-in…………... for system calls

a. Macros

b. instructions

c. memory

d. processor

14. A macro processor that is not tied to, or integrated with, a particular language or piece of software is called …………..

a. specific purpose macro processor

b. general purpose macro processor

c. Both a and b

d. Core processor

Page 6: MC0073 System Programming

15. The usual reason for using micros is to avoid the overhead of a ………….. in simple case

a. function call

b. Code complexity

c. programmer burden

d. both b and c

16. During macro expansion, the macro statement is replaced by …………

a. sequence of assembly statements

b. address of original code

c. actual code

d. both a and b

17. The program that takes one or more objects generated by compilers and assembles them into a single executable program is called ………..

a. linker or link editor

b. compiler

c. assembler

d. both b and c

18. On Unix variants the term …………... is often used as a synonym for linker.

a. loader

Page 7: MC0073 System Programming

b. link editor

c. compiler

d. assembler

19. Collection of subprograms used to develop software is called …………

a. Library

b. Off-shelf program

c. reusable program

d. both b and c

20. Dynamic linking means that the subroutines of a library are loaded into an application program ……………

a. at run time

b. at compile time

c. at the testing time

d. both b and c

21. Computer program that transfers data from offline memory into internal storage is called

a. Loader

b. compiler

c. linker

d. both a and b

Page 8: MC0073 System Programming

22. the loader can also replace…………………. with physical addresses

a. system call

b. Relocated address.

c. virtual addresses

d. function call

23. The object code (or executable code) is generated by a …………

a. Compiler

b. assembler

c. Both a and b

d. linker

24. The process of replacing symbolic references or names of libraries with actual usable addresses in memory before running a program is called …………

a. Relocation

b. translation

c. Addressing

d. both a and c

Page 9: MC0073 System Programming

25. an abstract machine consisting of a set of states (including the initial state), a set of input events, a set of output events, and a state transition function is called…………..

a. Finite State Machine

b. Moore Machine

c. Mearly Machine

d. both a and b

26. If there can be more than one transition from a given state for a given possible input is called ………….

a. Mearly Machine

b. deterministic automata.

c. non-deterministic automata.

d. Moore Machine

27. Type of finite state machine where the outputs are generate as products of the states is called ………

a. Moore Machine

b. Finite State Machine

c. both a and b

d. Mearly Machine

Page 10: MC0073 System Programming

28. Type of finite state machine where the outputs are generated as products of the transition between states is called ……….

a. Moore Machine

b. Finite State Machine

c. Mearly Machine

d. both a and b

29. Compiler is a ……………….

a. Translator

b. debugger

c. interpreter

d. both a and b

30. Lexical analyzer, or scanner, separates characters of the source

language into groups that logically belong together; these groups

are called………..

a. statements

b. Words

c. tokens

d. Both b and c

31. The primary difference between intermediate code and

assembly code is that the intermediate code need not specify the

………….. to be used for each operation

a. Registers

b. Variables

c. Pointer

Page 11: MC0073 System Programming

d. both a and b

32. The intermediate code generation phase transforms this parse tree into an intermediate language representation of the source program called ……….

a. Object code

b. Assembly code

c. Three-Address Code.

d. both b and c

33. Byte inside computer memory can only hold numbers from ………..

a. 0 to 255

b .-166 to 166

c. -256 to 256 d. 0 to 166

34. The computer keeps track of the first unused byte in memory by simply remembering its address, in the so-called ………….

Page 12: MC0073 System Programming

a. file pointer

b. Program counter

c stack pointer

d. Queue pointer

35. A memory binding is an association between ……….

a. memory address

b. Virtual address

c. memory address of to different machine

d. both a and b

36. In static memory allocation, memory is allotted to a variable…………. of a program begins

a. At the time

b. After the execution

c. before the execution

d. both a and b

Page 13: MC0073 System Programming

37. A program or application that software developers use to create, debug, or maintain other programs and applications is called ………….

a. programming tool

b. software tool

c. editing tool

d. both a and b

38. Collections of computer data and instructions is called ………..

a. information

b. Processor

c. software

d. Hardware

39. Which of the following is not the editor?

a. Automake

b. word processor, more complex text-producing tools

Page 14: MC0073 System Programming

c. graphics editor

d. HTML editor

40. A Debugger is a ………. that is used to test and debug other programs.

a. Hardware

b. Hardware program

c. computer program

d. both and b

Page 15: MC0073 System Programming

Part B (Two mark questions)

41. The specification gap is bridged by the ………….., while the execution gap is bridged by the …………..

a. software development team, designer of the programming language processor

b. Hardware development team, translator

c. translator, software development team

d. Interpreter, Hardware development team

42. A binding performed before the execution of a program begins is called…………and a binding performed after the execution of a program has begun is called ……….

a. static binding , dynamic binding

Page 16: MC0073 System Programming

b. dynamic binding , static binding

c. run time , compile time

d. program binding, static binding

43. The Von Neumann Architecture is a computer design model that uses a ………... and a……... ……………. structure

a. processing unit, single separate storage

b. Multiple processing unit, multiple separate storage

c. Multiple processing unit, single separate storage

Page 17: MC0073 System Programming

d. data bus, device

44. Binary is a………... System where as switches represent………..

a. Translator, communicator

b. Analog , data condition

c. mathematical number, data

d. Character , on-of condition

45. A simple Assembly Language, each statement has two operands. They are………..

a. first operand is always a register, and second operand refers to a memory word using a symbolic name

Page 18: MC0073 System Programming

b. first operand is always a memory word, and second operand register

c. First operand is variables, and second operand is temporary variable

d. register and accumulator

46. An assembler must do the two type of tasks, they are ………….

a. 1. process the pseudo-operations 2. generate the run able code

b. 1. instruct the compiler 2. generate the instruction

c. 1. Generate instructions 2. Process pseudo-operations

Page 19: MC0073 System Programming

d. 1. generate the instructions 2. run the program

47. A macro ……………. be passed to another function using a function pointer, because the macro itself has ……....

a. Cannot, no address

b. can, address

c. can, no address

d. cannot, address

48. A reasonable use of conditional assembly would be to combine two versions of a program, they are……….

Page 20: MC0073 System Programming

a. 1. Compiled program 2. debugged program

b. 1. Heigh level program 2. Middle level program.

c. 1. prints debugging information during test 2.production operation

d. 1. Production operation 2. middle level program

49. Dynamic linking offers two advantages: which are they?

a. it provide the link at the run time, pointer assignment is difficult

b. it is difficult to track the address, passing a pointer to the

address is difficult

c. libraries need to be stored in only one location, function by

static linking would have to be re-linked first.

d. Libraries need to be stored at the multiple location, linking must

be done at the compile time.

Page 21: MC0073 System Programming

50. The objects are …………. containing machine code and

…………..for the linker.

a. compiled code , link

b. Program modules, link

c. program modules, information

d. assembly codes , link

51. The most fundamental functions of loader are to bringing ….. ………….. into memory and starting its execution.

a. an object program

b. located data

c. A header files

d. Both a and b

Page 22: MC0073 System Programming

52. The loader can be quite simple in a way that it only tells the …………….. where file information is ……………………..

a. Programmer, loaded

b. Compiler, loaded

c. programmer, located

d. Linker, fetched

53. LL parsers are examples of………….. Where as LR parsers are examples of

a. top-down parsers. bottom-up parsers

Page 23: MC0073 System Programming

b. bottom-up parsers, top-down parsers

c. semantic parsing, Precedence Parser

d. Precedence Parser, bottom-up parsers

54. The productions of the parser can be used to build a …………. of a program written in human-readable source code that can be compiled to ………….

a. parse tree, assembly language or pseudo code.

b. assembly language or pseudo code, parse tree

c. token , pseudo code

d. assembly language, parser

55. The lexical analyzer is the interface between the.;…………... and the ………..

a. source program, compiler

b. source program, interpreter

c. Compiler , interpreter

Page 24: MC0073 System Programming

d. Source program and assembly program

56. YACC is a ………….. tool that accepts a …………... as input and generates the code for a parser for that grammar as output.

a. command-line, grammar description

b. simple , parse tree

c. operating system , program files

d. Vi-editor , comments

57. A static memory allocation corresponds to file …….. And………….

a. scope variables, local static variables

Page 25: MC0073 System Programming

b. global variable, local variable

c. static variable, dynamic variable

d. Register variable, accumulator

58. Heap memory pool is an ……….memory pool created at start-up that tasks use to …………. allocate memory as needed.

a. internal , dynamically

b. external, statically

c. external , dynamically

d. internal, statically

59.. software broken into two major categories

a. System Software , Application Software

b. utility software, application software

c. component software, hardware software

d. application software, hardware software

60. Which of the following is debugger?

a. OLIVER

Page 26: MC0073 System Programming

b. IBM Rational Purify

c. both a and b

d. word processor, more complex text-producing tools

Part C (Four mark questions)

61. match the followings: Part A 1). program that takes as input a program written in one programming language and produces as output a program in another language. 2). the process that processes the string of tokens built by lexical analysis to determine the statement class, e.g. assignment statement, if statement, etc. 3).A logically cohesive operation that takes as input one representation of the source program and produces as output another representation. Part B A. Phase B. Syntax analysis. C. language translator

a. 1. C, 2. A, 3. B

Page 27: MC0073 System Programming

b. 1.C, 2. B, 3. A

c. 1. A, 2. C, 3. B

d. 1.B, 2.A, 3. C

62. State weather the following statement is true or false for Language processors. 1).It is software which bridges a specification or execution gap. 2). typically It abandons the generation of the target program it detects errors in the source program. 3). A spectrum of language processors is defined to meet logical requirements a. 1. True, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. True, 2. True, 3. False

Page 28: MC0073 System Programming

63. State weather the following statement is true or false for RISC 1). Memory-to-memory: "LOAD" and "STORE" incorporated in instructions 2). Low cycles per second, large code sizes 3). Spends more transistors on memory registers

a. False, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False 2. False, 3. False

d. 1. True, 2. True, 3. False

64. Match the followings: Part A 1). operand field of instruction contains effective address 2).The instruction contains both the identity of an "index register" and a trailing displacement value. 3). a particular way to encode information for storage in a computer file. Part B A. Direct addressing B. file format C. Program Counter relative with index and displacement mode a. 1. C, 2. A, 3. B b. 1.C, 2. B, 3. A

c. 1. A, 2. C, 3. B

d. 1.B, 2.A, 3. C

Page 29: MC0073 System Programming

65. State weather the following statement is true or false for design of assembler 1). Specify the problem. 2). Define format of data structures 3). Look for modularity.

a. 1. True, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. True, 2. True, 3. False

66. match the followings: Part A Assembly mnemonic remarks 1)Register <— memory moveT 2).Sets condition code 3). Memory <- register move Part B Assembly mnemonic A. COMP B. MOVEM C. MOVER a. 1.C, 2. A, 3. B

b. 1.C, 2. B, 3. A

Page 30: MC0073 System Programming

c. 1. A, 2. C, 3. B

d. 1.B, 2.A, 3. C

67. State weather the following statement is true or false for Microsoft Macro Assembler. 1).MASM is one of the few Microsoft development tools for which one version targets both 16-bit and 32-bit. 2). It does not support macro facilities and structured programming idioms 3). The Microsoft Macro Assembler is an assembler for the x86 family of microprocessors

a. 1. True, 2. True, 3. True

b. 1. True, 2. False, 3. True

c. 1. False, 2. False, 3. False

d. 1. True, 2. True, 3. False

68. state weather the following statement is true or false for Valid macro arguments 1).arbitrary sequences of printable characters, not containing blanks, tabs, commas, or semicolons 2). Single printable characters, preceded by '!' as an escape character 3). Expressions preceded by a '%' character

a. 1. True, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. True, 2. True, 3. False

Page 31: MC0073 System Programming

69 . State weather the following statement is true or false for Boot strapping 1). It refers to a process where a simple system activates another more complicated system that serves the same purpose 2).It is a solution to the Chicken-and-egg problem of starting a certain system without the system already functioning 3). it's another name is linker

a. 1. True, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. True, 2. True, 3. False

70 . State weather the following statement is true or false for Dynamic Linking . 1). optimal amount of work is done at compile time by the linker 2).subroutines of a library are loaded into an application program at runtime 3). There is nothing special which needs to be done by the programmer to take advantage of shared libraries with dynamic linking

a. 1. False, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. True, 2. True, 3. False

Page 32: MC0073 System Programming

71. State weather the following statement is true or false for Motivation of a Retarget able loader . 1). The loader plays an important role in understanding the BFFs/BFF 2).if we have n different (M, OS, BFF) tuples, we will need to write n different loaders 3). The process carried out by all loaders are similar although the (M, OS, BFF) tuples are different

a. 1. True, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. True, 2. True, 3. False

72. State weather the following statement is true or false for process of parsing a computer language 1).The first stage is the token generation, or lexical analysis. 2). The next stage is syntactic parsing or syntactic analysis. 3). syntactic analysis is done with the help of context-free grammar

a. 1. True, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. False, 2. True, 3. False

Page 33: MC0073 System Programming

73. State weather the following statement is true or false for Advantages of FSM 1). Tstate transition can be predicted, allowing for easy testing. 2). FSMs are relatively flexible 3). there is no processor overhead

a. 1. True, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. True, 2. True, 3. False

74. State weather the following statement is true or false for Java Virtual Machine (JVM) 1).JVM can also be targeted by compilers of other languages. 2). Like most virtual machines, the Java Virtual Machine has a stack-based architecture 3). JVM is an efficient way of getting memory protection on simple architectures that lack a MMU

a. 1. True, 2. True, 3. True

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. False, 2. True, 3. False

Page 34: MC0073 System Programming

75. State weather the following statement is true or false for Reference counting 1).Reference counting is a form of automatic memory management where each object has a count of the number of references to it 2). An object's reference count is incremented when a reference to it is created. 3). If two or more objects refer to each other, they can create a cycle whereby neither will be collected as their mutual references never let their reference counts become one .

a. 1. True, 2. True, 3. False

b. 1. True, 2. False, 3. False

c. 1. False, 2. False, 3. False

d. 1. False, 2. True, 3. True

Page 35: MC0073 System Programming

Answer Keys

Part - A Part - B Part - C

Q. No. Ans. Key

Q.

No. Ans. Key Q. No. Ans. Key Q. No. Ans. Key

1 A 21 A 41 A 61 B

2 B 22 C 42 A 62 D

3 A 23 A 43 A 63 A

4 A 24 A 44 C 64 C

5 C 25 A 45 A 65 A

6 C 26 C 46 C 66 A

7 A 27 A 47 A 67 B

8 C 28 C 48 C 68 A

9 A 29 A 49 C 69 D

10 C 30 C 50 C 70 A

11 A 31 A 51 A 71 A

12 A 32 C 52 C 72 A

13 A 33 A 53 A 73 D

14 B 34 C 54 A 74 A

15 A 35 A 55 A 75 A

16 A 36 C 56 A

17 A 37 D 57 A

18 A 38 C 58 A

19 A 39 A 59 A

20 A 40 C 60 C