Unit -1 Language processors

Document Sample
Unit -1 Language processors Powered By Docstoc
					                               SYSTEM SOFTWARE
                                    BC0051
                                  BCA -4(New)
1-Marks Questions (Qs 1 to Qs 40.)

Qs 1. A ----- is program that takes as input a program written in one programming
language and produces as output a program in another language.
    Language translator
    Translator
    Interpreter
    Compiler

Ans A

Qs 2. The designer expresses the ideas in terms related to the -----
   Application domain
   Execution domain
   All of the above
   None of the above

Ans A

Qs 3. To implement the ideas, their description has to be interpreted in terms related to
the --------
    Application domain
    Execution domain
    All of the above
    None of the above

Ans B

Qs 4. The semantic gap has many consequences like --------
   large development time
   large development efforts
   poor quality of software
   all of the above

Ans D

Qs 5.PLs stands for
   procedure languages
   Programming languages
   periodic languages
   none of the above

Ans B
Qs 6. Software implementation using a PL introduces a new domain ---
   application domain
   execution domain
   PL domain
   all of the above
Ans C

Qs 7. The gap between the PL and execution domains is known as
   specification –and design gap
   specification gap
   both of the above
   none of the above
Ans C

Qs 8. Each domain has ----- language.
   design
   programming
   specification
   all of the above

Ans C

Qs 9. A language processor is software which bridges a specification or execution gap.
   a) true
   b) false

Ans A

Qs 10. Semantics represents rules of meaning of a domain.
   true
   false

Ans A

Qs 11. Semantic gap represents the difference between the semantics of two domains
   true
   false

Ans A

Qs 12. Program generation activities and program execution activities are the processing
activities come under -------.
    processing activities
    language processing activities
    all of the above
    none of the above
Ans B

Qs 13 TP stands for
   Transaction program
   Target program
   Terminal program
   target processing

Ans B

Qs 14. Reduction in the specification gap does not increase the reliability of the generated
program.
   True
   False

Ans B

Qs 15. Program translation model bridges the execution gap by translating a program
written in a PL, called the ----------- ,into an equivalent program in the machine or
assembly language of the computer system called the ---------.
    source program, target program
    target program, target program
    source, source program
    target program, source program

Ans A

Q16. _______ is a generic term referring to any computer software’s, which manages &
controls the hardware so that application software can perform a task.
   OS
   Application software
   System software
   All of the above
Ans C

Qs 17. If system software is stored no- volatile storage such as integrated circuit, it is
usually termed as -------------.
   OS
   Application software.
   firmware
   None of the above

Ans C
Qs18. Von Neumann architecture are generally used interchangeably
   True
   False

Ans A

Qs 19. _____of pixels represent a computer graphic data like pictures, frames of movie
drawings or frame of an animation.
   Collection
   Bit Value
   Grid
   All of the above
Ans C

Qs 20. JPEG & GIF are two graphics format used on the Internet as a ______ format.

   Wide
   Extended
   Less Memory
   Compressed

Ans D

Q21. CISC stands for
   Computer Instruction set computer
   Complex Instruction Set Computer
   Coordinated instruction set computer
   None of the Above

Ans B

Qs 22. CISC made a computer assembly language more like a high level language to
begin with leaving the compiler less to do.
   True
   False

Ans A

Qs 23 RISC stands for.
   Risk Instruction set computer
   Reduced instruction set computer
   Rescheduled Instruction Set
   None of the above

Ans B
Qs 24. In Assembly Language each statement has two operands; the first operand is
always a ______which can be any one of the AREG, BREG, and CREG & DREG

   Register
   Assemble
   All of the above
   None of these

Ans A

Qs 25. A ------- is a particular kind of unintentional memory consumption by a computer
program where the program fails to release memory when no longer needed.
   memory
   memory leak
   storage area
   all are correct

Ans B

Qs 26. Static memory, stack based allocation and dynamic memory allocation are storage
allocations takes in computer program for running of the user program
    correct
    Incorrect

Ans D

Qs27. Macros are abbreviations for arbitrary fragments of C code, and then the C
preprocessor will replace the macros with their definitions throughout the program
during---------
    Macro expansion
    conditional compilation
    line control
    all of the above

Ans D
]
Qs 28 MASM is an --------- for x86 family of microprocessors.
   a) assembler
   b) compiler
   c) linker
   d) loader
Ans A

Qs 29 SPARC assembler stands for
   Serial processor architecture
   Sun Microsystems processor architecture
   Scalable processor architecture
   none of the above

Ans C

Qs 30. The content of MOT table are not filled in or altered during the assembly process.
   True
   False

Ans A

Qs 31. Assembler directives instruct the assembler to perform certain actions during the
assembly of a program.

   Valid statement
   Invalid statement

Ans A

Qs 32. Imperative / declarative and assembler directives are three kinds of statements
supported by an assembly program.
   Correct
   Incorrect

Ans A

Qs 33. The ------ instructions move a value between a memory word and a register.

   BC
   MOVE
   MOVER
   MOVEM
Ans B

Qs 34 _______ is a data structure which is used by compiler to keep track of scope and
binding information about names.
   Compiler Table
   System Table
   Symbol Table
   None of the above
Ans C

Qs 35 This representation is used when there is an upper bound or limit on the length of
the name.
    a) Fixed Length representation
    b) Pointer to symbol
   c) None of the above

Ans A

Qs- 36 Table entries organized in to m separate linked lists, are called __________
   a) Tables
   b) Array
   c) List
   d) Bucket

Ans D

Qs-37 The errors which can be detected at run time is _________
   a) Static Error
   b) Semantic Error
   c) Syntactic Error
   d) Dynamic Errors
Ans D

Qs- 38 _________is the execution of a series of programs(“jobs”) on a computer without
human interaction.
   a) Multitasking
   b) Multi Programming
   c) Batch Processing
   d) Job Scheduling

Ans C

Qs-39 __________ is a minimal computer operating system kernel which provides no
operating system services at all.
   a) Microprocessor
   b) Microkernel
   c) Micro program
   d) None of the above
Ans B

Qs 40 Which of the following is not the part of PCB(Process Control Block)
   a) Pointer
   b) Address of the data
   c) Program Counter
   d) Registers

Ans B
2-Marks Questions (Qs 41 to Qs 60.)


Qs 41. The specification gap is bridged by the software development ----- and the
execution gap is bridged by the designer of the ----------
   team , programming language processor
   team, translator
   both 1 and 2
   none of the above

Ans A

Qs 42. Use of PL can be grouped into
       (1) Specification, design and coding steps
       (2) PL implementation steps
   Both are true
   Both are false
   (1) is True, (2) is false
   (1) is False, (2) is true
Ans A

Qs 43. The --------------language is a specification language of an application domain and
the ------- language is typically a procedure oriented PL.
    source, target
    target, target
    source, source
    target, target

Ans A

Qs 44. Popular models for program execution are ------- and ---------
   translation, programming
   interpretation , programming
   Translation, interpretation
   all of the above

Ans C

Qs 45. MOVE instruction is used to move a value between a memory & a register.

   True
   False

Ans A
Qs 46 Libraries contain -------- and -------- which provide services to independent
programs.
   source code , object code
   test plan , source code
   helper code , data
   data , information and knowledge

Ans C

Qs 47. A macro call leads to -----------. During macro expansion, the macro statement is
replaced by sequence of -------------.
    conditional compilation , assembly statements
    macro expansion, assembly statements
    line control, statements
    macros definition , statements

Ans B

Qs 48. The first pass of assembler is only to define the -------; the second pass can then
generate ---------

   address, instruction
   symbols, data
   symbols, instruction and addresses
   address, symbol

Ans C

Qs 49. In assembly language, each statement has two operands, the first operand is
always a ---------- which can be any one of AREG, BREG, CREG and DREG. The
second operands refers to a -------- using a symbolic name and an optional displacement.
   memory word, register
   register, memory word
   index value, register
   register, index value

Ans B

Qs 50. Link editor is a program, that takes one or more objects generated by -------- and
Assembles them into a single --------- program.
   linker, executable
   loader, compiled
   compilers, executable
   compilers, compiled

Ans C
Q 51. When one uses a C compiler under a UNIX system to generate an executable from
the C source code, the C compiler driver will usually invoke a C –processor, --------,
assembler and --------- in that order to translate the C-language code into the executable
file.
     linker, compiler
     link- editor, assembler
     compiler, loader
     compiler, link editor

Ans D

Qs 52 A binary object file is either an executable file that runs on a particular machine or
a file containing object code that needs to be linked. The object code is generated by a
_______ or by an --------.
     linker, loader
     link editor, loader
     compiler, assembler
     assembler, linker

Ans C

Qs 53 A --------- table can be provided in the header of the object code file. Each “fix up”
is a pointer to an address in the object code that must be changed when the -----relocates
the program.
     FAT , loader
     Fix up , loader
     MOT, compiler
     all of the above are correct

Ans B

Q-54 State true & False
 (1) A process can choose to wait for children to terminate
(2) After a fork parent stop running and child process start running

   Both are true
   Both are false
   (1) is True
   (2) is true

Ans C

Q 55 True / False
   (1) Kernel is same as BIOS(Basic Input Output System)
   (2) Kernel includes an interrupt handler that handles all requests or completed I/O
       operations
            a)   Both are true
            b)   Both are false
            c)   (1) is True
            d)   (2) is true

Ans D

Q- 56 True/False
   Semantic errors can be detected both at compile time and at run time
   Syntactic error are detectable by lexical phase or syntactic phase of the compiler
          Both are true
          Both are false
          (1) is True
          (2) is true

Ans A

Q-57 Which of the following is valid macro argument
   1) Expression preceded by &
   2) Arbitrary sequences of valid macro arguments
   3) Multiple characters preceded by ‘!’ as an escape character
   4) Arbitrary sequence of printable characters, not containing Blanks, tabs, commas,
      or semicolons
      a) 1 & 2
      b) 2 & 3
      c) 1 & 4
      d) 1 & 3

Ans D

Q-58 which of the following is not the tools that does not deal with machine code
instructions
1) Disasembler
2) Debugger
3) Assembler
4) Decompiler
5) Binary Translator
6) Compiler

            a)   1, 2
            b)   4, 6
            c)   3, 6
            d)   4, 6

Ans     C
Q-59 Relocation is done in two steps these are
1) The linker merges the entire object to a single executable file
2) The source code is converted in object code
3) Each section refers to one or more symbols which should be modified so that they
point to the correct runtime
4) A Symbol table is generated. With addresses

   a)   1&3
   b)   1&4
   c)   2&4
   d)   1&2

Ans A

60) True or False
1) During program loading a program is copied from main memory to secondary storage.
2) Bootstrapping can also refer to the development of successively more complex, faster
programming environments.
    a) Both are true
    b) Both are false
    c) 1 is True
    d) 2 is True

Ans D

4-Marks Questions (Qs 61 to Qs 75.)

Qs 61. If the source language is a high level language such as FORTRAN or Cobol and
the object language is a low level language then such a translator is called ----------,
translator transform a programming language into a simplified language called
intermediate code called --------- , if the source language is assembly language and the
target language is machine language the translator is called ----------, and translators that
takes program in one high level language into equivalent programs in another high level
language called
-----------.

        a)   Preprocessor, compiler, assembler and interpreter
        b)   Compiler, interpreter, assembler, preprocessor
        c)   Interpreter, compiler, assembler, preprocessor
        d)   All of the above are correct

Ans B
Qs 62 The Von Neumann architecture is a computer design model that uses a ---------- &
------------to hold --------- & ----------.
         a) Data & instruction, storage structure & processing unit
         b) Knowledge & data, cpu speed & Structure
         c) Storage structure & processing unit, data & instruction,
         d) Data & instruction, Knowledge & data,

Ans C

Qs 63. RISC or reduced instruction_______ is a type of_________ architecture that
utilizes a small, ________set of instruction rather than a more _______of instructions
often found in other type of architecture

        a)   Set Computer, microprocessor, highly optimized, specialized set.
        b)   Specialized set, microprocessor, highly optimized, Set computer,
        c)   Set computer, microprocessor, specialized set, highly optimized,
        d)   None of the above
Ans A

Qs 64. . ---------- is the process of a lazing a sequence of -------- to determine its
grammatical structure with respect to a given -----------. A parser is the component of a ---
that carries out this task.
        a) Parsing, tokens, formal grammar, compiler
        b) Compiling, keywords, grammar, assembler
        c) Parsing, keywords, grammar, assembler
        d) Parsing, tokens, grammar, assembler
Ans A

Qs 65 -------- is the process of replacing symbolic references or names of libraries with
actual usable addresses in memory before running a program. It is done by -------- during
-----------although if can be done at run-time by a -------.
     a) parsing, loader, linker, loader
     b) relocation, linker ,loader, compilation
     c) relocation, linker , compilation , loader
     d) loading , loader, parsing , compiler

Ans C

Qs 67. Match the register names and their meanings
Column A                                    Column B

        1.   AX                -      (a)     stack pointer
        2.   DX                -      (b)     base pointer
        3.   BP                -      (c)     base register
        4.   SP                -      (d)     accumulator register
                                      (e)     Destination index
                                   -   (f)     Data register
   a)   (1)-a,(2)-d,(3)-c,(4)-e
   b)   (1)-d,(2)-b,(3)-c,(4)-a
   c)   (1)-d (2)-f (3)-b, (4)-a
   d)   (1)-a,(2)-e,(3)-d,(4)-a

Ans C

Qs 68. An ---------- is a program which accepts assembly language program as input and
produces its equivalent ------------as output along with information for the loader. The
input to the assembler program is called -------- and the output is called the ----------
   Compiler, machine language program, object program, source program.
   Assembler, machine language program, source program, object program.
   Linker, machine language program, source program, object program.
   Loader, machine language program, source program, object program.

Ans B

Qs 69. Bootstrapping can also refer to the development of successively more --------, -----
- The simplest environment will be perhaps, a very basic ---------and an ------------
program.

   a)   complex, faster programming environment, text editor, assembler
   b)   simple, faster programming environment, text editor, linker
   c)   complex , slow programming environment, text editor, loader
   d)   complex, Average programming environment, text editor, linker

Ans A

Qs 70. Code optimization is an optional phase designed to improve the ---------code so
that the ultimate object program runs ------and takes --------- space. Its output is another
intermediate code program that does the same job as the original, but perhaps in a way
that saves time and space.
    a. Intermediate, faster, less, time and space
    b. Program, slow, more, time and space
    c. Complex, faster, more, time and space
    d. More, faster, program, time / space

Ans A

Qs 71. The bookkeeping portion of the ----- keeps track of the names used by the
program and records essential information about each such as its--------------
The ---------- used to record this information is called ----------
   a) compiler, type (int, Real), MOT
   b) Compiler, type ( int ,real), data structure, symbol table
   c) linker, data type, structure, table
    d) Loader, data type, structure, symbol table.

Ans B

Qs 72. The lexical analyzer is the interface between ------- and -----------. The lexical
analyzer reads the ------- program one character at a time, carving the source program
into a sequence of characters that can be treated as a single logical entity. Identifiers,
keywords, constants, operators, and punctuation symbols such as commas, and
parentheses are typical-------.

    a)     object code , compiler, source, tokens
    b)     source program , compiler , source , tokens
    c)     keywords , source code, object , tokens
    d)     source code, object code, keywords, tokens

Ans B

Qs 73 match the following
       Column A                                             Column B
1. Arrays                                          A. This type of representation is best
                                                      Suitable when there is not any limit
                                                      Length
2. Lists                                           B. Data structure which includes two
                                                     Link fields, left and Right to each
                                                    Record
3. Trees                                           C. Data structure which uses one array
                                                      Or more arrays to store names and
                                                      Their associated information
4. Pointer to Symbol Table Entry                   D. Data structure to implement a
                                                      Symbol table. Where one record is
                                                      Used for one name

    a)     (1)-A,(2)-D,(3)-C,(4)-B
    b)     (1)-D,(2)-B,(3)-C,(4)-A
    c)     (1)-D (2)-C,(3)-B, (4)-A
    d)     (1)-A,(2)-C,(3)-B,(4)-D

Ans C

Qs 74 Match the Following
       Column A                                            Column B
1. Semantic Errors                                 A. The sources of this type of errors are
                                                      Undeclared names and type
                                                      Incompatibilities

2. Syntactic Phase Errors                          B. The errors which are detected at run
                                       Time
3. Lexical Phase Errors            C. In this phase, errors are detected by
                                       Parser when it has no legal move
                                       From its current configuration

4. Dynamic Errors                  D. In this phase, errors are detected
                                       When there is no prefix of the
                                       Remaining input fits the
                                       specification
                                       of any token class

   a)   (1)-A,(2)-C,(3)-D,(4)-B
   b)   (1)-D,(2)-B,(3)-C,(4)-A
   c)   (1)-D (2)-C,(3)-B, (4)-A
   d)   (1)-A,(2)-C,(3)-B,(4)-D

Ans A

Qs 75 Match the Following
        Column A                           Column B
1. Interrupt/ Trap Handling        A. Creating and deleting processes,
                                      Assigning privileges and resources to
                                      Processes

2. Process Management              B. Exchange information between
                                       Processes
3. Short Term Scheduling           C. Choose which process to run
4. Interprocess Communication      D. Contains interrupts service routines,
                                       One for each possible type of
                                       Interrupt.

   (1)-A,(2)-C,(3)-D,(4)-B
   (1)-D,(2)-A,(3)-C,(4)-B
   (1)-D (2)-C,(3)-B, (4)-A
   (1)-A,(2)-C,(3)-B,(4)-D

Ans B

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:9
posted:10/1/2012
language:Latin
pages:16