Wednesday 8 March 2023

Computer Graphics and Compiler Design MCQs



The basic element of a picture in volume graphics is 

Pixel

Volsel

Voxel

None of above

      _____________________________________________________________________________________

The ISO standard for computer Graphics is 

Graphics Kernel System

Graphics Standard System

Computer graphics standard

None of above

      _____________________________________________________________________________________

The amount of light emitted by the phosphor coating depends on the? 

Number of electrons striking the screen

Speed of electrons striking the screen

Distance from the cathode to the screen

None of above

      _____________________________________________________________________________________

The best hidden surface removal algorithm is 

Painters

Depth buffer

Area subdivision

Depends on the application

      _____________________________________________________________________________________

Computer generated models of physical,financial and economic systems are often used for ? 

Entertainment

Quality Control

Educational Aid

None of above

      _____________________________________________________________________________________

The ......... simply reads each successive byte of data from the frame buffer 

Digital Controller

Data Controller

Display Controller

All of above

      _____________________________________________________________________________________

The subcategories of orthographic projection are 

Cavalier, cabinet, isometric

Cavalier, cabinet

Isometric, dimetric, trimetric

Isometric, cavalier, trimetric

      _____________________________________________________________________________________

The anti - aliasing technique which allows shift of 1/4,1/2 and 3/4 of a pixel diameter enabling a closer path of a line is ? 

Pixel phasing

Filtering

Intensity compensation

Sampling technique

      _____________________________________________________________________________________

The perspective anomaly in which the object behind the centre of projection is projected 

Perspective foreshortening

Vanishing view

View confusion

Topological distortion

      _____________________________________________________________________________________

The refresh rate below which a picture flickers is 

25

30

35

60

      _____________________________________________________________________________________

Back face removal is an example of 

Object space method

Image space method

Combination of both

None of above

      _____________________________________________________________________________________

All the hidden surface algorithms employee image space approach except ? 

Back face removal

Depth buffer method

Scan line method

Depth sort method

      _____________________________________________________________________________________

Input function are used for 

Control the data flow from these interactive devices

Process the data flow from these interactive devices

Both a & b

None of these

      _____________________________________________________________________________________

Fractals deals with curves that are 

Irregularly irregular

Regularly irregular

Irregularly regular

Regularly regular

      _____________________________________________________________________________________

The point at which a set of projected parallel lines appear to converge in called as a 

Convergence point

Vanishing point

Point of illusion

Point of delusion

      _____________________________________________________________________________________

Graphics and image processing technique used to produce a transformation of one object into another is called 

Animation

Morphine

Half toning

None of above

      _____________________________________________________________________________________

Which of the following device has a relative origin 

Joystick

Track ball

Mouse

None of above

      _____________________________________________________________________________________

The technique used to summarize the financial, statistical, mathematical,scientific and economic data is ? 

Computer Art

Image processing

Presentation Graphics

None of above

      _____________________________________________________________________________________

The maximum number of points that can be displayed without overlap on a CRT is refereed to as 

Resolution

Persistence

Attenuation

None of above

      _____________________________________________________________________________________

A view graph is 

An oversized slide designed for presentation on an O.H.P

Designed and created by exposing film to the output of the graphics system

A hard copy chart

None of the above

      _____________________________________________________________________________________

Computer Graphics models are now commonly used for making ? 

Motion pictures

Music Videos

Television shows

All of above

      _____________________________________________________________________________________

Assuming that one allows 256 depth value levels to be used how much memory would a 512 x 512 pixel display require to store the z-buffer 

5l2 k

256 k

1024 k

128 k

      _____________________________________________________________________________________

Raster scan systems display a picture from a definition in a 

Display file program

Frame buffer

Display controller

None of the above

      _____________________________________________________________________________________

In a clipping algorithm of Cohen & Sutherland using region codes, a line is already clipped if the 

Logical AND of the end point code is not 0000

Logical OR of the end points code is 0000

Logical AND of the end point code is 0000

A and B

      _____________________________________________________________________________________

In displaying a clipped picture the efficient method is ? 

Clipping against the window and then applying the window transformation

Applying window transformation and then clipping against the viewport

Both A and B have the same efficiency

Efficiency depends on whether the window is an aligned rectangle or not

      _____________________________________________________________________________________

A surface appearing block 

Reflects all the incident colors

Reflects all the incident colors expect block

Reflects only block and absorbs the rest

Reflects none

      _____________________________________________________________________________________

Interactive computer graphics uses various kind of input devices such as 

Mouse

Graphic tablet

Joystick

All of these

      _____________________________________________________________________________________

........ used to regulate the flow of elections in CRT ? 

Electronic Gun

Focusing electrode

Control electrode

All of the above

      _____________________________________________________________________________________

The light pen is an 

Graphics input device

Graphics output device

Both a & b

None of these

      _____________________________________________________________________________________

A joystick is a 

Graphics input device

Graphics output device

Both a & b

None of these

      _____________________________________________________________________________________

The glow given off by the, phosphor during exposure of the electron beam is known as ? 

Fluorescence

Phosphorescence

Persistence

All of the above

      _____________________________________________________________________________________

If a and b are the end points of a line, then which one of the following is true ? 

If a and b are the end points of a line, then which one of the following is true ?

If both end points are left, right, above or below the window, the line is completely visible.

If both end points are left, right, above or below the window, the line is trivially visible.

If both end points are left, right, above or below the window, the line is trivially invisible

      _____________________________________________________________________________________

If the eccentricity is less than one then the conic is 

Circle

Parabola

Ellipse

Hyperbola

      _____________________________________________________________________________________

Special System designed for some training application are known as ? 

GUI

Simulators

Video Display Devices

None of above

      _____________________________________________________________________________________

When several types of output devices are available in graphics installation, it is convenient to use ? 

Bundled attributes

Unbundles attributes

Inquiry attributes

All of above

      _____________________________________________________________________________________

Gray scale is used in ? 

Monitor that have color capability

Monitor that have no color capability

Random scan display

None of above

   



The output of lexical analyzer is

A set of regular expressions

Syntax tree

Set of tokens

Strings of character

      _____________________________________________________________________________________

If conversion from one type to another type is done automatically by the compiler then,it is called

Implicit conversion

coercions

both a and b

None of the above

      _____________________________________________________________________________________

Syntax directed translation scheme is desirable because 

It is based on the syntax

Its description is independent of any implementation

It is easy to modify

All of these

      _____________________________________________________________________________________

A top down parser generates 

Right most derivation

Right most derivation in reverse

Left most derivation

Left most derivation in reverse

      _____________________________________________________________________________________

 Macro-processors are ______

Hardware

Compiler

Registers

None of the above

      _____________________________________________________________________________________

Inherited attribute is a natural choice in

Keeping track of variable declaration

Checking for the correct use of L values and R values

Both A and B

None of these

      _____________________________________________________________________________________

Concept which can be used to identify loops is 

Dominators

Reducible graphs

Depth first ordering

All of these

      _____________________________________________________________________________________

Reduction in strength means 

Replacing run time computation by compile time computation

Removing loop invariant computation

Removing common sub expression

Replacing a costly operation by a relatively cheaper one

      _____________________________________________________________________________________

the term environment in programming language semantics is said as

function that maps a name to value held there

Function that maps a name to storage location

The functin that maps a storage location to the value held there

None of the above

      _____________________________________________________________________________________

A self relocating program is one which 

cannot be made to execute in any area of storage other than the designated for it at the time of its coding or translation

Consists of a program and relevant information for its relocation

Can itself perform the relocation of its address sensitive protions

All of the above

      _____________________________________________________________________________________

The lexical analyzer takes_________as input and produces a stream of_______as output. 

Source program,tokens

Token,source program

Either A and B

None of the above

      _____________________________________________________________________________________

Intermediate code generation phase gets input from 

Lexical analyzer

Syntax analyzer

Semantic analyzer

Error handling

      _____________________________________________________________________________________

A grammar is meaningless 

If terminal set and non terminal set are not disjoint

If left hand side of a production is a single terminal

If left hand side of a production has no non terminal

All of these

      _____________________________________________________________________________________

The optimization technique which is typically applied on loops is 

Removal of invariant computation

Peephole optimization

Constant folding

All of these

      _____________________________________________________________________________________

resolution is externally defined symbols is performed by 

linker

loader

compiler

assembler

      _____________________________________________________________________________________

Which of the following is used for grouping of characters into tokens?

Parser

Code optimization

Code generator

Lexical analyzer

      _____________________________________________________________________________________

Whether a given pattern constitutes a token or not depends on the 

Source language

Target language

Compiler

All of these

      _____________________________________________________________________________________

A optimizing compiler

Is optimized to occupy less space

Is optimized to take less time for execution

Optimized the code

None of the above.

      _____________________________________________________________________________________

Which of the following symbols table implementation is based on the property of locality of reference?

Hash table

Search tree

Self organizing list

Linear list

      _____________________________________________________________________________________

Three address code involves 

Exactly 3 address

At most most 3 address

No unary operators

None of these

      _____________________________________________________________________________________



A

B

C

D

      _____________________________________________________________________________________

A compiler is 

A program that place program into memory and prepares them for execution

A program that automates the translation of assembly language into machine language

program that accepts program written in high level language and produces an object program

A program that appears to execute a source program as if it were machine language

      _____________________________________________________________________________________

In a bottom up evaluation of a syntax direction definition ,inherited attributes can

Always be evaluated

Be evaluated only if the definition is L -attributed

Be evaluated only if the definition has synthesized attributes

None of the above

      _____________________________________________________________________________________

Which of the following actions an operator precedence parser may take to recover from an error ?

Insert symbols onto the stack

Delete symbols from the stack

Insert or delete symbols from the input

All of the above

      _____________________________________________________________________________________

DAG representation of a basic block allows

Automatic detection of local common sub expressions

Automatic detection of induction variables

Automatic detection of loop variant

None of the above

      _____________________________________________________________________________________

Recursive descent parsing is an example 

Top down parsing

Bottom up parsing

Predictive parsing

None of the above

      _____________________________________________________________________________________

The graph that shows basic blocks and their successor relationship is called

DAG

Flow chart

Control graph

Hamiltonian graph

      _____________________________________________________________________________________

Generation of intermediate code based on a abstract machine model is useful in compilers because 

it makes implementation of lexical analysis and syntax analysis easier

syntax directed translation can be written for intermediate code generation.

It enhances the portability of the front end of the compiler

it is not possible to generate code for real machines directly from high level language programs

      _____________________________________________________________________________________

Advantage of panic mode of error recovery is that 

It is simple ti implement

It never gets into an infinite loop

Both A and B

None of these

      _____________________________________________________________________________________

In operator precedence parsing , precedence relations are defoned 

For all pair of non terminals

For all pair of terminals

To delimit the handle

Only for a certain pair of terminals

      _____________________________________________________________________________________

An intermediate code form is

Postfix notation

Syntax trees

Three address code

All of these

      _____________________________________________________________________________________

Code can be optimized at

Source from user

Target code

Intermediate code

All of the above

      _____________________________________________________________________________________

Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted.
Program main;
Var ...
Procedure A1;
Var ...
Call A2;
End A1
Procedure A2;
Var ...
Procedure A21;
Var ...
Call A1;
End A21
Call A21;
End A2
Call A1;
End main.
Consider the calling chain: Main -> A1 -> A2 -> A21 -> A1
The correct set of activation records along with their access links is given by


A

B

C

D

      _____________________________________________________________________________________

Pee hole optimization

Loop optimization

Local optimization

Constant folding

Data flow analysis

      _____________________________________________________________________________________

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

      _____________________________________________________________________________________

A compiler for a high level language that runs on one machine and produce code for different machine is called 

Optimizing compiler

One pass compiler

Cross compiler

Multipass compiler

      _____________________________________________________________________________________

Which of the following is used for grouping of characters into tokens (in a computer)

A parser

Code optimizer

Code generator

Scanner

      _____________________________________________________________________________________

Local and loop optimization in turn provide motivation for 

Data flow analysis

Constant folding

Pee hole optimization

DFA and constant folding

      _____________________________________________________________________________________

A simple two-pass assembler does which of the following the first phase

It allocates space for the literals.

It computes the total length of the program.

It builds the symbol table for the symbols and their values.

All of above

      _____________________________________________________________________________________

the translator is best described as

Application software

A system software

A hardware component

All of the above

      _____________________________________________________________________________________

Which of the following is the most powerful parser? 

SLR

LALR

Canonical LR

Operator precedence

      _____________________________________________________________________________________

Which of the following are language processors?

Assembler

Compilers

interpreters

All of these

      _____________________________________________________________________________________

Relocating bits used by relocating loader are specified by 

Relocating loader itself

Linker

Assembler

Macro processor

      _____________________________________________________________________________________

Synthesized attribute can be easily simulated by a

LL grammar

Ambiguous grammar

LR grammar

None of the above

      _____________________________________________________________________________________

A compiler that runs on one machine and produces code for a different machine is called

Cross compilation

One pass compilation

Two pass compilation

None of the above

      _____________________________________________________________________________________

_________or scanning is the process where the stream of characters making up the source program is read from left to right and grouped into tokens.

Lexical analysis

Diversion

Modeling

None of the above

      _____________________________________________________________________________________

Input to code generator

Source code

Intermediate code

Target code

All of the above

      _____________________________________________________________________________________

In analysis the compilation PL/I program the description Create of more optimal matrix is associated with 

Assembly and output

code generation

Syntax analysis

machine independent optimization

      _____________________________________________________________________________________

A bottom up parser generates 

right most derivation

right most derivation in reverse

left most derivation

left most derivation in reverse

      _____________________________________________________________________________________

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

re-allocation

allocation

linking

loading



No comments:

Post a Comment