41.
If the frame buffer has 10-bits per pixel and
8-bits are allocated for each of the R,G, and B components, then what would be
the size of the color lookup table (LUT)?
(1) (28+29)
bytes
(2) (210+28)
bytes
(3) (210+224)
bytes
(4) (210+211)
bytes
Answer: 4
42. Which
homogeneous 2D matrix transforms the figure (a) on the left side to the figure
(b) on the right?
43. Consider
the midpoint (or Bresenham) algorithm for rasterizing lines given below:
(1) Input (x1,
y1) and (x2, y2)
(2) y = y1
(3) d = f(x1
+ 1, y1 + 1/2) //f is the implicit form of a line
(4) for x = x1
to x2
(5) do
(6) plot(x,y)
(7) if (d<0)
(8) then
(9) y = y+1
(10) d = d+(y1−y2)
+ (x2−x1)
(11) else
(12) d = d+(y1−y2)
(13) end
(14) end
Which
statements are true?
P: For a line with slope m>1, we
should change the outer loop in line (4) to be over y
Q:
Lines (10) and (12) update the
decision variable d through an incremental evaluation of the line equation f
R: The algorithm fails if d is over 0
Choose the
correct answer from the code given below:
Code:
(1) P only
(2) P and Q
only
(3) Q and R
only
(4) P, Q and
R
Answer: 2
44. In
3D Graphics, which of the following statements about perspective and parallel
projection is/are true?
P:
In a perspective projection,
the farthest an object is from the centre of projection, the smaller it appears.
Q:
Parallel projection is
equivalent to a perspective projection where the viewer is standing infinitely
far away.
R: Perspective projections do not
preserve straight lines.
Choose the
correct answer from the code given below:
Code:
(1) P and Q
only
(2) P and R
only
(3) Q and R
only
(4) P, Q and
R
Answer: 1
45. In
3D Graphics, which of the following statements is/are true?
P:
Back-face culling is an example
of an image-precision visible-surface determination procedure.
Q:
Z- buffer is a 16-bit, 32-bit,
or 64 bit field associated with each pixel in a frame buffer that can be used
to determine the visible surfaces at each pixel.
Choose the
correct answer from code given below:
Code:
(1) P only
(2) Q only
(3) P and Q
(4) Neither
P nor Q
Answer: 2
46. Consider
the following pseudo-code fragment, where m is a non-negative integer that has
been initialized:
p
= 0
k
= 0
while
(k<m)
p
= p + 2k
k
= k + 1
end
while
Which of the
following is a loop invariant for the while statement?
(Note: a
loop invariant for a while statement is an assertion that is true each time the
guard is evaluated during the execution of the while statement).
(1) p = 2k
− 1 and 0≤k<m
(2) p = 2k+1
− 1 and 0≤k<m
(3) p = 2k
− 1 and 0≤k≤m
(4) p = 2k+1
− 1 and 0≤k≤m
Answer: 3
47. Consider
the following two C++ programs P1 and P2 and two statements S1 and S2 about
these programs:
S2: P2 prints out 4:2
What can you
say about the statements S1 and S2?
Code:
(1) Only S1
is true
(2) Only S2
is true
(3) Both S1
and S2 are true
(4) Neither
S1 nor S2 is true
Answer: 1
48. Consider
the following recursive Java function f that takes two long arguments
and returns a float value:
public
static float f(long m, long n)
{
float result = (float) m / (float) n;
if (m < 0 || n < 0)
return 0.0f;
else
result += f(m*2, n*3);
return result;
}
Which of the
following integers best approximates the value of f(2,3)?
(1) 0
(2) 1
(3) 2
(4) 3
Answer: 3
49. What
does the following Java function perform? (Assume int occupies four bytes of
storage)
public
static int f(int a)
{ // Pre-conditions : a > 0 and no overflow/underflow
occurs
int b=0;
for (int i=0; i<32; i++)
{
b = b<<1;
b = b | (a & 1);
a = a >>>1; // This is a
logical shift
}
return b;
}
(1) Returns
the int that has the binary representation of integer a
(2) Return
the int that has the reversed binary representation of integer a
(3) Return
the int that represents the number of 1’s in the binary representation of
integer a
(4) Return
the int that represents the number of 0’s in the binary representation of integer
a
Answer: 2
50. Which
of the following HTML5 codes will affect the horizontal as well as vertical
alignment of table content?
(1) <td
halign =”middle” valign=”center”> BASH</td>
(2) <td
align =”middle” valign=”center”> BASH</td>
(3) <td
style=”horizontal-align:center; vertical-align:middle;”> BASH</td>
(4) <td
style=”text-align:center; vertical-align:middle;”> BASH</td>
Answer: 4
51. Consider
the C/C++ function f() given below:
void f(char
w[])
{
int x=strlen(w); //length of a string
char c;
for (int i=0; i<x; i++)
{
c=w[i];
w[i]=w[x-i-1];
w[x-i-1] =c;
}
}
Which of the
following is the purpose of f()?
(1) It
outputs the contents of the array in reverse order
(2) It
outputs the contents of the array in the original order
(3) It
outputs the contents of the array with the characters shifted over by one
position
(4) It
outputs the contents of the array with the characters rearranged so they are no
longer recognized as the words in the original phrase
Answer: 2
52. The
Software Requirement Specification (SRS) is said to be ................ if and
only if no subset of individual requirements described in it conflict with each
other.
(1) Correct
(2) Consistent
(3) Unambiguous
(4) Verifiable
Answer: 2
53. Software
products need perfective maintenance for which of the following reasons?
(1) To
rectify bugs observed while the system is in use
(2) When the
customers need the product to run on new platforms
(3) To
support new features that users want it to support
(4) To
overcome wear and tear caused by the repeated use of the software
Answer: 3
54. Match
each UML diagram in List I to its appropriate description in List II
List I List II
(a) State
Diagram (i) Describes how the
external entities
(people,
devices) can interact with
the system
(b) Use-Case
Diagram(ii) Used to describe the static or
structural
view of a system
(c) Class
Diagram (iii) Used to show the flow
of a business
process,
the steps of a use-case or
the logic of
an object behaviour
(d) Activity
Diagram (iv) Used to describe the
dynamic behaviour
of
objects and could also be used to describe
the
entire system behaviour
Code:
(1) (a)-(i);
(b)-(iv); (c)-(ii); (d)-(iii)
(2) (a)-(iv);
(b)-(ii); (c)-(i); (d)-(iii)
(3) (a)-(i);
(b)-(iv); (c)-(iii); (d)-(ii)
(4) (a)-(iv);
(b)-(i); (c)-(ii); (d)-(iii)
Answer: 4
55. Which
of the following statements is/are false?
P: The clean-room strategy to software
engineering is based on the incremental software process model.
Q: The clean-room strategy to software
engineering is one of the ways to overcome “unconscious” copying of copyrighted
code.
Choose the
correct answer from the code given below:
Code:
(1) P only
(2) Q only
(3) Both P
and Q
(4) Neither
P nor Q
Answer: 4
56. Consider
the following method:
int f(int m,
int n, boolean x, boolean y)
{
int res = 0;
if (m<0) {res = n - m;}
else if (x || y)
{
res = -1;
if(n == m){res = 1;}
}
else {res = n;}
return res;
} /*end of f
*/
IF P is the
minimum number of tests to achieve full statement coverage for f(), and Q is
the number of tests to achieve full branch coverage for f(), then (P,Q) =
(1) (3,4)
(2) (4,3)
(3) (2,3)
(4) (3,2)
Answer: 1
57. A
legacy software system has 940 modules. The latest release required that 90 of
these modules be changed. In addition, 40 new modules were added and 12 old
modules were removed. Compute the software maturity index for the system.
(1) 0.849
(2) 0.524
(3) 0.725
(4) 0.923
Answer: 1
58. Which
of the following statements is/are true?
P: Software
Reengineering is preferable for software products having high failure rates,
having poor design and/or having poor code structure.
Q: Software
Reverse Engineering is the process of analyzing software with the objective of
recovering its design and requirement specification.
Choose the
correct answer from the code given below:
Code:
(1) P only
(2) Q only
(3) Both P
and Q
(4) Neither
P nor Q
Answer: 3
59. Which
of the following is not one of the principles of agile software development
method?
(1) Customer
involvement
(2) Embrace
change
(3) Incremental
delivery
(4) Following
the plan
Answer: 4
60. Software
coupling involves dependencies among pieces of software called modules. Which
of the following are correct statements with respect to module coupling?
P: Common coupling occurs when two
modules share the same global data.
Q:
Control coupling occurs when
modules share a composite data structure and use only parts of it.
R:
Content coupling occurs when
one module modifies or relies on the internal working of another module.
Choose the
correct answer from the code given below:
Code:
(1) P and Q
only
(2) P and R
only
(3) Q and R
only
(4) All of
P, Q and R
Answer: 2
0 Comments