Computer Graphics MCQs with Answers
Practice important Computer Graphics MCQs with answers and explanations.
Chapter: 9
Q301:
Flood-fill algorithm is used in which type of applications?
A. Hardware drivers
B. Image editing tools
C. Compilers
D. Data encoders
Correct Answer:
B
Chapter: 9
Q302:
If a pixel’s color is neither boundaryColor nor fillColor in boundary-fill, it will be ______.
A. Ignored
B. Reset
C. Filled
D. Deleted
Correct Answer:
C
Chapter: 9
Q303:
Flood-fill can replace all ______ pixels of a selected color.
A. Random
B. Bright
C. Connected
D. Unused
Correct Answer:
C
Chapter: 9
Q304:
In the boundary-fill pseudocode, which function is used to check the pixel color?
A. isPixelColor()
B. checkPixel()
C. GetPixel()
D. ReadColor()
Correct Answer:
C
Chapter: 9
Q305:
What does setPixel(fillColor, x, y) do in the algorithm?
A. Reads pixel
B. Deletes pixel
C. Colors pixel with fillColor
D. Skips pixel
Correct Answer:
C
Chapter: 9
Q306:
In boundary-fill, what happens if current pixel is boundaryColor or fillColor?
A. It gets filled
B. It gets deleted
C. It is skipped
D. It is colored white
Correct Answer:
C
Chapter: 9
Q307:
In flood-fill algorithm, what condition prevents recursion when pixel color is not oldColor?
A. Break
B. Skip
C. Continue
D. Return
Correct Answer:
D
Chapter: 9
Q308:
Which algorithm uses directions like fillEast, fillSouth, fillWest, and fillNorth?
A. Simple fill
B. Line fill
C. Fast flood-fill
D. Horizontal fill
Correct Answer:
C
Chapter: 9
Q309:
Recursive algorithms like boundary-fill can cause which issue in large images?
A. Memory leak
B. Overflow
C. Infinite loop
D. Stack overflow
Correct Answer:
D
Chapter: 9
Q310:
Which version of flood-fill is more optimized and uses fewer directions per call?
A. Basic flood-fill
B. Slow fill
C. Fast flood-fill
D. Deep fill
Correct Answer:
C
Chapter: 9
Q311:
A graphic artist can use ______ to sketch outlines and then fill them with color.
A. flood-fill
B. line-fill
C. boundary-fill
D. color-picker
Correct Answer:
C
Chapter: 9
Q312:
The recursive call boundaryFill(x+1, y, fillColor, boundaryColor) explores which neighbor?
A. Left
B. Right
C. Top
D. Bottom
Correct Answer:
B
Chapter: 9
Q313:
The recursive call floodFill(x, y-1, fillColor, oldColor) explores which neighbor?
A. Top
B. Bottom
C. Left
D. Right
Correct Answer:
A
Chapter: 9
Q314:
Boundary fill starts filling from a point ______.
A. outside the figure
B. on the edge
C. inside the figure
D. below the figure
Correct Answer:
C
Chapter: 9
Q315:
Flood fill is preferred when ______.
A. outline is not defined
B. pixel color needs to be replaced
C. shapes are incomplete
D. fill color is not defined
Correct Answer:
B
Chapter: 9
Q316:
Which color is never changed by boundary-fill algorithm?
A. Fill color
B. Transparent color
C. Background color
D. Boundary color
Correct Answer:
D
Chapter: 9
Q317:
Which of the following is TRUE about flood-fill?
A. It ignores unconnected pixels
B. It works from outside in
C. It requires a boundary
D. It only uses two directions
Correct Answer:
A
Chapter: 9
Q318:
The function fillFast(x, y, fillColor) internally calls ______.
A. fillBoundary
B. floodEast
C. fillEast, fillSouth, fillWest, fillNorth
D. checkFill
Correct Answer:
C
Chapter: 9
Q319:
Boundary-fill and flood-fill are both types of ______ algorithms.
A. Drawing
B. Raster scan
C. Area-filling
D. Line clipping
Correct Answer:
C
Chapter: 9
Q320:
boundaryFill algorithm can be called how many times from one call?
A. 2
B. 4
C. 6
D. 1
Correct Answer:
B