You are on page 1of 35

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

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

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

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 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 b. BC c. BC d. BC

<condition code spec>, <register address> <memory address> <condition code spec>, <memory address> <condition code spec>

11. Each imperative statement typically translates into .... a. one machine instruction

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

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

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

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

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

30. Lexical analyzer, or scanner, separates characters of the source 28. Type of finite state machine where the together; these groups as language into groups that logically belong outputs are generated products of the transition between states is called . are called.. a. statements a. Moore Machine b. Words State Machine Finite c. Mearly Machine c. tokens d. both a and b d. Both b and c 29. Compiler is a . a. Translator 31. The primary difference between intermediate code and assembly code is that the intermediate code need not specify the b. debugger .. to be used for each operation c. interpreter a. Registers d. both a and b b. Variables c. Pointer

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 .

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

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 textproducing tools

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

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 calledand a binding performed after the execution of a program has begun is called .

a. static binding , dynamic binding

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

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

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

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.

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Answer Keys Part - A Q. Q. No.


1 2 3 4 5 6 7 8 9 10 11

Part - B

Part - C

Ans. Key
A B A A C C A C A C A

No.
21 22 23 24 25 26 27 28 29 30 31

Ans. Key
A C A A A C A C A C A

Q. No.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Ans. Key
A A A C A C A C C C A C A A A A A A A C

Q. No.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75

Ans. Key
B D A C A A B A D A A A D A A

12 A 13 14 15 16 17 18 19 20 A B A A A A A A

32 C 33 34 35 36 37 38 39 40 A C A C D C A C

You might also like