Skip to Content

HPSC ASSISTANT PROFESSOR BOOK AND TEST SERIES MCQ PYQ 2025

2 January 2025 by
HPSC ASSISTANT PROFESSOR BOOK AND TEST SERIES MCQ PYQ 2025
VIVEK

1. Which of the following is NOT a high-level programming language?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Python
  • b) C
  • c) Assembly
  • d) Java
    Answer: c) Assembly

2. What does the term "syntax" refer to in a programming language?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) The meaning of a program
  • b) The set of rules defining the structure of valid statements
  • c) The time complexity of the program
  • d) The flow of control in the program
    Answer: b) The set of rules defining the structure of valid statements

HPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES LINK-https://www.apnitest.in/shop/hpsc-assistant-professor-ap-computer-science-10-section-11-booklets-and-pyq-booklet-online-test-series-70-all-type-of-test-76?search=HPSC#attribute_values=

3. What is the primary purpose of an interpreter in programming languages?

(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Translate high-level code into machine code
  • b) Execute programs directly
  • c) Convert assembly language into binary
  • d) Optimize the execution time of programs
    Answer: b) Execute programs directly

4. Which of the following programming languages is known for its "write once, run anywhere" philosophy?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) C++
  • b) Java
  • c) Python
  • d) Pascal
    Answer: b) Java

5. What is the main advantage of using object-oriented programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Easy to learn
  • b) Reusability of code
  • c) Faster execution time
  • d) Better error handling
    Answer: b) Reusability of code

6. Which of the following is NOT an example of a procedural programming language?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Fortran
  • b) C
  • c) Python
  • d) Java
    Answer: d) Java

7. In which phase of the compiler are syntax errors detected?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Lexical analysis
  • b) Parsing
  • c) Optimization
  • d) Code generation
    Answer: b) Parsing

8. What is the role of a linker in the compilation process?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Translate source code into object code
  • b) Convert high-level language to machine code
  • c) Combine object files into a single executable
  • d) Check for syntax errors
    Answer: c) Combine object files into a single executable

9. Which of the following languages supports the concept of "garbage collection"?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

10. What does the term "polymorphism" refer to in object-oriented programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) A method that can be called multiple times
  • b) The ability to take many forms
  • c) The ability to inherit properties from another class
  • d) A class that can implement multiple interfaces
    Answer: b) The ability to take many forms

11. Which of the following is the correct definition of recursion?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) A function that calls itself
  • b) A function that does not require parameters
  • c) A method of code optimization
  • d) A data structure that stores values
    Answer: a) A function that calls itself

12. Which of the following is NOT a feature of functional programming languages?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) First-class functions
  • b) Immutable data
  • c) Looping statements
  • d) Recursion
    Answer: c) Looping statements

13. What is the term for a variable that cannot be modified once it is initialized in programming languages?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Constant
  • b) Static variable
  • c) Global variable
  • d) Local variable
    Answer: a) Constant

14. In which programming paradigm is the problem-solving process structured as a sequence of steps and procedures?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Functional programming
  • b) Procedural programming
  • c) Object-oriented programming
  • d) Logic programming
    Answer: b) Procedural programming

15. What is the role of an operating system's shell in programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) It compiles the source code
  • b) It provides a user interface for program execution
  • c) It stores files on a disk
  • d) It translates high-level language into machine code
    Answer: b) It provides a user interface for program execution

16. Which programming language was specifically designed for teaching programming to beginners?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

17. Which of the following is a characteristic of a dynamically typed language?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Variable types are determined at compile-time
  • b) Variables are typed manually by the programmer
  • c) Variable types are determined at runtime
  • d) The language does not support type safety
    Answer: c) Variable types are determined at runtime

18. Which of the following statements about abstract data types (ADTs) is TRUE?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) ADTs provide concrete implementation details
  • b) ADTs do not specify operations
  • c) ADTs define only the interface, not the implementation
  • d) ADTs are not used in object-oriented programming
    Answer: c) ADTs define only the interface, not the implementation

19. Which of the following is a valid use case for lambda functions in Python?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Creating reusable, named functions
  • b) Defining anonymous functions for short-term use
  • c) Handling errors
  • d) Defining variables
    Answer: b) Defining anonymous functions for short-term use

20. Which of the following is NOT a feature of Java?

  • a) Platform independence
  • b) Automatic memory management (garbage collection)
  • c) Direct access to memory through pointers
  • d) Strong exception handling
    Answer: c) Direct access to memory through pointers

Section 2: Computer Graphics

21. Which of the following algorithms is used to draw a straight line in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) DDA algorithm
  • b) Bresenham's line algorithm
  • c) Midpoint circle algorithm
  • d) Both a and b
    Answer: d) Both a and b

22. What is the main purpose of clipping in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To remove unwanted objects from the scene
  • b) To enhance image quality
  • c) To adjust the colors of pixels
  • d) To convert raster images into vector images
    Answer: a) To remove unwanted objects from the scene

23. Which of the following is used to represent colors in a digital image?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

24. What is the process of transforming an image from 3D to 2D called?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Rendering
  • b) Clipping
  • c) Scaling
  • d) Projection
    Answer: d) Projection

25. Which of the following is NOT a type of transformation in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Translation
  • b) Rotation
  • c) Scaling
  • d) Gradient
    Answer: d) Gradient

26. What is the main advantage of the raster graphics model over vector graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Easier to edit
  • b) Supports high-level abstraction
  • c) More efficient for storing complex images
  • d) Uses mathematical equations to describe images
    Answer: c) More efficient for storing complex images

27. Which of the following is the standard color model used in display devices?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) RGB
  • b) CMYK
  • c) HSL
  • d) YUV
    Answer: a) RGB

28. In computer graphics, what is the term for the process of adjusting the size of an object?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Scaling
  • b) Rotation
  • c) Translation
  • d) Reflection
    Answer: a) Scaling

29. What is the main goal of anti-aliasing in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To increase the sharpness of edges
  • b) To reduce jaggedness or "staircase" effects in curves
  • c) To increase the color depth of the image
  • d) To convert vector images into raster images
    Answer: b) To reduce jaggedness or "staircase" effects in curves

30. Which of the following describes a pixel in a raster image?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

31. In the context of graphics rendering, what is the term "z-buffer" used for?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Calculating pixel color values
  • b) Determining object visibility in 3D space
  • c) Managing image resolution
  • d) Storing texture maps
    Answer: b) Determining object visibility in 3D space

32. Which of the following methods is used to render curves in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) B-Splines
  • b) Bézier curves
  • c) NURBS
  • d) All of the above
    Answer: d) All of the above

33. What is a common use case for the Phong shading model in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Drawing polygons
  • b) Simulating realistic lighting on 3D objects
  • c) Smoothing out pixels
  • d) Clipping objects to the viewport
    Answer: b) Simulating realistic lighting on 3D objects

34. In computer graphics, what does the term "texture mapping" refer to?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Applying a texture to a 3D object’s surface
  • b) Mapping colors to pixels
  • c) Scaling textures for optimization
  • d) Creating 3D models
    Answer: a) Applying a texture to a 3D object’s surface

35. What type of projection is used in computer graphics to simulate depth in a 2D image?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Orthographic projection
  • b) Perspective projection
  • c) Isometric projection
  • d) None of the above
    Answer: b) Perspective projection

36. Which of the following methods is used to fill a polygon in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

37. In 3D graphics, which term refers to the position of an object in space relative to a camera?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Viewpoint
  • b) Normal vector
  • c) Model matrix
  • d) Light source
    Answer: a) Viewpoint

38. Which of the following is a technique used to simulate shadows in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Ray tracing
  • b) Rasterization
  • c) Texture mapping
  • d) Both a and b
    Answer: a) Ray tracing

39. What is the term for the smallest unit of an image that can be controlled in digital graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Vertex
  • b) Pixel
  • c) Fragment
  • d) Node
    Answer: b) Pixel

40. In computer graphics, what does the term "polygon mesh" refer to?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) A wireframe structure composed of vertices and edges
  • b) A solid object represented by a series of polygons
  • c) A texture applied to 3D objects
  • d) A background pattern
    Answer: b) A solid object represented by a series of polygons


41. What is the output of the following code in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

cpp

Copy code

int x = 5; cout << ++x;

42. Which of the following is a disadvantage of using pointers in programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Faster execution
  • b) Increased complexity and risk of memory leaks
  • c) Memory allocation is easier
  • d) Better memory optimization
    Answer: b) Increased complexity and risk of memory leaks

43. Which type of data structure uses the Last In First Out (LIFO) principle?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Queue
  • b) Stack
  • c) Linked List
  • d) Tree
    Answer: b) Stack

44. Which of the following is an example of a non-procedural programming language?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) COBOL
  • b) SQL
  • c) C++
  • d) Fortran
    Answer: b) SQL

45. Which of the following operations is performed by a compiler?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Lexical analysis
  • b) Code optimization
  • c) Machine code generation
  • d) All of the above
    Answer: d) All of the above

46. In object-oriented programming, what is the term used for a function that is associated with an object?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Method
  • b) Constructor
  • c) Destructor
  • d) Variable
    Answer: a) Method

47. In which of the following programming languages is the concept of "duck typing" most prevalent?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) C++
  • b) Python
  • c) Java
  • d) Assembly
    Answer: b) Python

48. Which of the following features of programming languages allows you to handle runtime errors?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

49. Which of the following is a key characteristic of imperative programming languages?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Emphasizes the "what" over the "how"
  • b) Uses mathematical functions for computation
  • c) Emphasizes the sequence of operations (control flow)
  • d) Uses object-based structures
    Answer: c) Emphasizes the sequence of operations (control flow)

50. What is a key difference between C and C++ programming languages?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) C is object-oriented, while C++ is procedural
  • b) C++ supports classes and objects, whereas C does not
  • c) C is a higher-level language than C++
  • d) There is no difference between C and C++
    Answer: b) C++ supports classes and objects, whereas C does not

51. What does the term "overloading" refer to in object-oriented programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Defining multiple constructors in a class
  • b) Defining multiple methods with the same name but different signatures
  • c) Inheriting properties from a superclass
  • d) Wrapping a class method to protect it
    Answer: b) Defining multiple methods with the same name but different signatures

52. Which of the following is the first step in the process of compilation?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Lexical analysis
  • b) Syntax analysis
  • c) Code generation
  • d) Optimization
    Answer: a) Lexical analysis

53. Which of the following types of variables can be used to store a true/false value?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Integer
  • b) Char
  • c) Boolean
  • d) Float
    Answer: c) Boolean

54. What is the primary function of a garbage collector in languages like Java?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To free up unused memory
  • b) To handle exceptions
  • c) To optimize memory access
  • d) To detect syntax errors
    Answer: a) To free up unused memory

55. In C++, which of the following is used to allocate memory dynamically?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

56. What is the result of the following code in C?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

c

Copy code

int x = 10, y = 20; printf("%d", x == y);

  • a) 1
  • b) 10
  • c) 0
  • d) Compilation error
    Answer: c) 0

57. Which of the following best describes the purpose of a "constructor" in object-oriented programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To delete objects
  • b) To initialize object state
  • c) To print object properties
  • d) To compare two objects
    Answer: b) To initialize object state

58. What does the acronym SQL stand for?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Simple Query Language
  • b) Structured Query Language
  • c) Standard Query List
  • d) Sequence Query Language
    Answer: b) Structured Query Language

59. Which of the following is an advantage of using a linked list over an array?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Direct access to elements
  • b) Fixed size
  • c) Efficient insertion and deletion
  • d) Better memory management
    Answer: c) Efficient insertion and deletion

60. In which language is the concept of "lambda functions" most commonly used?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

Section 2: Computer Graphics (Continued)

61. What does the term "rasterization" refer to in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Converting vector graphics to raster images
  • b) Drawing images on a grid of pixels
  • c) Storing images in vector form
  • d) Applying textures to 3D models
    Answer: b) Drawing images on a grid of pixels

62. What is the function of a transformation matrix in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To perform color adjustments
  • b) To perform geometric transformations like translation, scaling, and rotation
  • c) To display images on the screen
  • d) To compress image files
    Answer: b) To perform geometric transformations like translation, scaling, and rotation

63. Which algorithm is used to fill an enclosed area in a polygon?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Bresenham's algorithm
  • b) Flood fill algorithm
  • c) DDA algorithm
  • d) Midpoint ellipse algorithm
    Answer: b) Flood fill algorithm

64. In 3D graphics, which of the following techniques helps to improve the appearance of an object by simulating realistic lighting?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Phong shading
  • b) Flat shading
  • c) Gouraud shading
  • d) Both a and c
    Answer: d) Both a and c

65. What is the term for a visual representation of data as an image in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Vector graphics
  • b) Bitmap
  • c) Image rendering
  • d) Texture mapping
    Answer: b) Bitmap

66. Which of the following is a common technique for creating realistic shadows in 3D rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

67. Which of the following algorithms is used to generate the convex hull of a set of points in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Quickhull algorithm
  • b) Merge sort algorithm
  • c) Dijkstra’s algorithm
  • d) Kruskal’s algorithm
    Answer: a) Quickhull algorithm

68. What is the process of converting a 3D object into a 2D image called?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Clipping
  • b) Rendering
  • c) Projection
  • d) Texturing
    Answer: b) Rendering

69. What does the term "anti-aliasing" refer to in graphics rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Increasing the resolution of an image
  • b) Reducing the jagged edges of curved lines
  • c) Applying a gradient to an object
  • d) Converting an image into a vector format
    Answer: b) Reducing the jagged edges of curved lines

70. In the context of computer graphics, what is "texture mapping"?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Applying images to a surface of a 3D object
  • b) Filling polygons with solid color
  • c) Converting images into pixels
  • d) Scaling objects in 3D space
    Answer: a) Applying images to a surface of a 3D object

71. What is the result of a perspective projection in 3D computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Objects appear the same size regardless of distance
  • b) Parallel lines remain parallel
  • c) Objects appear smaller as they move farther away from the viewer
  • d) Objects are rotated in 3D space
    Answer: c) Objects appear smaller as they move farther away from the viewer

72. Which of the following is a disadvantage of using wireframe models in 3D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

73. Which of the following methods is used to reduce the amount of data required for 3D model storage?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Texture compression
  • b) Polygon simplification
  • c) Object culling
  • d) All of the above
    Answer: d) All of the above

74. In computer graphics, what is the term for the technique that computes the colors and lighting effects at every pixel on an object’s surface?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Ray tracing
  • b) Rasterization
  • c) Shading
  • d) Clipping
    Answer: c) Shading

75. What is the primary purpose of a "depth buffer" (Z-buffer)?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To store color values for each pixel
  • b) To manage object visibility in 3D scenes
  • c) To compress textures for faster rendering
  • d) To store object positions in 3D space
    Answer: b) To manage object visibility in 3D scenes

76. What is the result of applying an affine transformation to an object in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) The object can be rotated, scaled, or translated
  • b) The object becomes transparent
  • c) The object is divided into smaller pieces
  • d) The object is converted to vector format
    Answer: a) The object can be rotated, scaled, or translated

77. In computer graphics, what is the term for creating a detailed model of an object using polygons and vertices?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

78. Which type of lighting model is used in 3D rendering to simulate how light interacts with surfaces?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Lambertian reflection
  • b) Phong reflection
  • c) Blinn-Phong shading
  • d) All of the above
    Answer: d) All of the above

79. What is the term used for the process of dividing a 3D object into polygons for rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Shading
  • b) Tesselation
  • c) Clipping
  • d) Projection
    Answer: b) Tesselation

80. Which of the following describes a technique used to make 3D models appear more realistic by simulating surface texture?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Reflective shading
  • b) Texture mapping
  • c) Polygon smoothing
  • d) Depth mapping
    Answer: b) Texture mapping

Section 3: Computer Graphics (Final Part)

81. What is the purpose of "vertex shaders" in 3D graphics rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

82. Which of the following defines the concept of "rendering pipeline" in 3D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) The process of transforming objects into 3D models
  • b) The series of steps to convert 3D models into a final 2D image
  • c) The method of applying textures to models
  • d) The storage format for 3D models
    Answer: b) The series of steps to convert 3D models into a final 2D image

83. Which of the following describes the role of "normal vectors" in 3D computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) They control the size of an object
  • b) They define the direction of light sources
  • c) They are used for determining the orientation of surfaces in lighting calculations
  • d) They indicate the center of mass of an object
    Answer: c) They are used for determining the orientation of surfaces in lighting calculations

84. What is "barycentric coordinates" used for in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To model reflections
  • b) To interpolate values in a triangle
  • c) To calculate lighting effects
  • d) To define textures on 3D surfaces
    Answer: b) To interpolate values in a triangle

85. In 3D computer graphics, which transformation is performed to make an object larger?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Rotation
  • b) Translation
  • c) Scaling
  • d) Shearing
    Answer: c) Scaling

86. Which of the following is used to simulate reflective surfaces in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

87. Which algorithm is commonly used to determine the visibility of objects in 3D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Z-buffer algorithm
  • b) Quicksort algorithm
  • c) Depth-first search algorithm
  • d) Dijkstra’s algorithm
    Answer: a) Z-buffer algorithm

88. What is the purpose of "back-face culling" in 3D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To remove surfaces that are not visible from the camera's point of view
  • b) To make sure the texture mapping is applied correctly
  • c) To calculate shading and lighting
  • d) To perform collision detection
    Answer: a) To remove surfaces that are not visible from the camera's point of view

89. Which of the following is NOT a component of the rendering pipeline in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Vertex processing
  • b) Clipping
  • c) Tiling
  • d) Fragment processing
    Answer: c) Tiling

90. What is the term for the process of transforming 3D models into wireframe representations before final rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)


91. What is the role of a linker in programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) It translates the source code into machine code
  • b) It links external functions with the main program
  • c) It handles memory allocation
  • d) It performs syntax checking
    Answer: b) It links external functions with the main program

92. In C++, what is the purpose of the virtual keyword?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To create an object
  • b) To declare a function as abstract
  • c) To enable polymorphism
  • d) To define a constant
    Answer: c) To enable polymorphism

93. Which data type is commonly used to represent floating-point numbers in most programming languages?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Integer
  • b) Float
  • c) Char
  • d) Double
    Answer: b) Float

94. Which type of function call in C/C++ can be used to pass arguments by reference?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Call by value
  • b) Call by address
  • c) Call by reference
  • d) Recursive function call
    Answer: c) Call by reference

95. Which of the following is an example of a "for loop" in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

96. In object-oriented programming, what does "inheritance" allow?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Reusing code from other classes
  • b) The creation of new classes
  • c) Overloading of functions
  • d) The hiding of variables in a class
    Answer: a) Reusing code from other classes

97. In C, which of the following is used to dynamically allocate memory for an array?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) malloc()
  • b) free()
  • c) realloc()
  • d) new()
    Answer: a) malloc()

98. Which of the following C++ operators is used for dynamic memory allocation?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) malloc()
  • b) new
  • c) calloc()
  • d) realloc()
    Answer: b) new

99. Which of the following is an advantage of using a hash table for storing data?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) It provides quick access to data based on a key
  • b) It guarantees data is stored in order
  • c) It uses less memory
  • d) It sorts the data automatically
    Answer: a) It provides quick access to data based on a key

100. What is the time complexity of accessing an element in a hash table with perfect hash function?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) O(1)
  • b) O(log n)
  • c) O(n)
  • d) O(n^2)
    Answer: a) O(1)

101. Which of the following is an example of a programming language that supports both functional and imperative programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Python
  • b) Java
  • c) C++
  • d) JavaScript
    Answer: a) Python

102. Which keyword is used in C++ to prevent modification of a variable after its initialization?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) const
  • b) final
  • c) static
  • d) volatile
    Answer: a) const

103. Which of the following describes "recursion" in programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

104. What is a "static variable" in programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) A variable that retains its value between function calls
  • b) A variable that is only accessible within a function
  • c) A variable that is dynamically allocated
  • d) A variable that can only be used for local storage
    Answer: a) A variable that retains its value between function calls

105. Which programming paradigm is used by languages like Java and C++ for creating programs based on classes and objects?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Procedural programming
  • b) Object-oriented programming
  • c) Functional programming
  • d) Logic programming
    Answer: b) Object-oriented programming

106. In the context of databases, what does SQL stand for?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Structured Query Language
  • b) Sequential Query Language
  • c) Standard Query List
  • d) System Query Language
    Answer: a) Structured Query Language

107. In the context of databases, what does the SQL JOIN operation do?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Combines rows from two or more tables
  • b) Creates new tables from existing tables
  • c) Deletes data from tables
  • d) Changes the structure of tables
    Answer: a) Combines rows from two or more tables

108. What is the primary purpose of the "hashing" technique in data structures?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To store data in sorted order
  • b) To encrypt sensitive data
  • c) To efficiently access data using a hash function
  • d) To split large data sets into smaller chunks
    Answer: c) To efficiently access data using a hash function

109. What is the result of 5 / 2 in integer division in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) 2
  • b) 2.5
  • c) 5
  • d) 0
    Answer: a) 2

110. Which of the following is an example of a "syntax error"?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

111. What is "polymorphism" in object-oriented programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) The ability to change data types dynamically
  • b) The ability to store multiple types of objects in the same container
  • c) The ability to execute different functions based on the object type
  • d) The ability to create infinite objects from a class
    Answer: c) The ability to execute different functions based on the object type

112. What type of loop guarantees that the code inside the loop is executed at least once?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) While loop
  • b) For loop
  • c) Do-while loop
  • d) None of the above
    Answer: c) Do-while loop

113. Which of the following is used to store a collection of values in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Array
  • b) List
  • c) Set
  • d) Map
    Answer: a) Array

114. Which of the following is an example of "compile-time polymorphism" in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Function overloading
  • b) Virtual functions
  • c) Operator overloading
  • d) Both a and c
    Answer: d) Both a and c

115. Which of the following is NOT a feature of object-oriented programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Abstraction
  • b) Encapsulation
  • c) Inheritance
  • d) Division
    Answer: d) Division

116. What is the default return type of a function in C++ if no return type is specified?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) int
  • b) void
  • c) char
  • d) float
    Answer: b) void

117. What does the sizeof() operator return in C/C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

118. Which of the following methods can be used to break out of a loop in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) continue
  • b) exit
  • c) break
  • d) return
    Answer: c) break

119. What is the result of 5 % 2 in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) 2
  • b) 1
  • c) 0
  • d) 5
    Answer: b) 1

120. Which of the following functions in C++ is used to allocate memory dynamically?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) malloc()
  • b) new
  • c) free()
  • d) alloc()
    Answer: b) new

Section 2: Computer Graphics (Continued)

121. What is the purpose of a "frame buffer" in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To hold pixel data for the final output image
  • b) To store textures used in rendering
  • c) To hold object geometry data
  • d) To perform object transformations
    Answer: a) To hold pixel data for the final output image

122. In 3D graphics, what is "ray tracing" used for?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

123. What does the term "texture mapping" refer to in 3D computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Mapping color values to vertices
  • b) Applying a 2D image to a 3D object
  • c) Transforming 3D objects into 2D
  • d) Calculating lighting effects on a surface
    Answer: b) Applying a 2D image to a 3D object

124. What does the term "polygonal mesh" refer to in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) A 3D object represented by a collection of polygons
  • b) A type of surface for texture mapping
  • c) A method for anti-aliasing
  • d) A lighting technique
    Answer: a) A 3D object represented by a collection of polygons

125. What does the "Z-buffer" technique help manage in 3D graphics rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Texture mapping
  • b) Object visibility based on depth
  • c) Shading and lighting
  • d) Motion blur
    Answer: b) Object visibility based on depth

126. Which of the following is NOT a part of the transformation pipeline in 3D computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Translation
  • b) Rotation
  • c) Scaling
  • d) Shading
    Answer: d) Shading

127. What is the purpose of the "blinn-phong shading model" in 3D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To simulate diffuse reflection only
  • b) To simulate both diffuse and specular reflections
  • c) To calculate object rotation
  • d) To apply texture maps to 3D objects
    Answer: b) To simulate both diffuse and specular reflections

128. Which of the following is an example of an image format that supports transparent backgrounds?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) JPEG
  • b) GIF
  • c) BMP
  • d) PNG
    Answer: d) PNG

129. In 3D graphics, which of the following operations is part of "view transformation"?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

130. What is the term for the technique of creating a 2D image from a 3D model, considering depth and perspective?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Clipping
  • b) Projection
  • c) Rendering
  • d) Texturing
    Answer: b) Projection

131. What is the purpose of using "normal vectors" in 3D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To calculate surface orientation for lighting
  • b) To define texture coordinates
  • c) To store depth information
  • d) To perform object scaling
    Answer: a) To calculate surface orientation for lighting

132. Which algorithm is commonly used to fill polygons in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Bresenham's line algorithm
  • b) Flood fill algorithm
  • c) DDA line algorithm
  • d) Midpoint circle algorithm
    Answer: b) Flood fill algorithm

133. What does the term "culling" refer to in 3D rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Removing non-visible objects from the scene
  • b) Adding textures to objects
  • c) Calculating object lighting
  • d) Applying shaders to objects
    Answer: a) Removing non-visible objects from the scene

134. Which technique is used to improve the performance of rendering in 3D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

135. What is "ambient lighting" in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Lighting that simulates direct sunlight
  • b) A general illumination that affects all objects equally
  • c) Lighting that changes based on camera position
  • d) Lighting applied only to the front faces of models
    Answer: b) A general illumination that affects all objects equally

136. What is the main purpose of a "pixel shader" in the rendering pipeline?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To compute the final color of a pixel based on lighting, texture, and other factors
  • b) To transform vertex positions into screen coordinates
  • c) To apply transformations to 3D models
  • d) To convert 3D models into 2D representations
    Answer: a) To compute the final color of a pixel based on lighting, texture, and other factors

137. In computer graphics, what is the term for a visual representation of a 3D model?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Texture map
  • b) Wireframe
  • c) Mesh
  • d) Polygon
    Answer: c) Mesh

138. Which of the following is used for simulating realistic light and shadow effects in 3D computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Ray tracing
  • b) Phong shading
  • c) Gouraud shading
  • d) Both a and b
    Answer: d) Both a and b

139. Which of the following is a 3D rendering technique that creates realistic images based on the path of light rays?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Rasterization
  • b) Ray tracing
  • c) Z-buffering
  • d) Clipping
    Answer: b) Ray tracing

140. What is the result of using the "perspective projection" in 3D rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Objects appear with their true size
  • b) Objects closer to the viewer appear larger
  • c) Objects appear in their actual position
  • d) All objects appear at equal distances
    Answer: b) Objects closer to the viewer appear larger

141. What is the main function of an assembler in programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To convert high-level code into machine code
  • b) To convert assembly language code into machine code
  • c) To generate object files from machine code
  • d) To interpret source code
    Answer: b) To convert assembly language code into machine code

142. What is "exception handling" in programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) A technique to handle multiple processes
  • b) A mechanism for handling errors at runtime
  • c) A method for optimizing code
  • d) A method to prevent stack overflow
    Answer: b) A mechanism for handling errors at runtime

143. What does the term "inheritance" refer to in object-oriented programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) The ability of a class to inherit the properties of another class
  • b) The process of breaking down large tasks into smaller ones
  • c) The ability to execute functions concurrently
  • d) The process of copying data between variables
    Answer: a) The ability of a class to inherit the properties of another class

144. Which of the following statements is true about a "constructor" in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

145. In which of the following does a function call itself recursively?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Recursive function
  • b) Iterative function
  • c) Callable function
  • d) Overloaded function
    Answer: a) Recursive function

146. Which of the following types of loops allows for the initialization of the loop variable in the header?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) While loop
  • b) For loop
  • c) Do-while loop
  • d) All of the above
    Answer: b) For loop

147. What is a "null pointer" in C/C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) A pointer that points to a memory address that is inaccessible
  • b) A pointer that does not point to any valid memory location
  • c) A pointer pointing to a zero-initialized variable
  • d) A pointer that holds the address of a null-terminated string
    Answer: b) A pointer that does not point to any valid memory location

148. What does the delete keyword do in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Deletes a variable from memory
  • b) Deletes a dynamically allocated object
  • c) Deletes an element from a container
  • d) Deletes the current line of code
    Answer: b) Deletes a dynamically allocated object

149. What is the purpose of an "interface" in object-oriented programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To provide a default implementation for methods
  • b) To define a contract of methods without providing the implementation
  • c) To manage memory allocation
  • d) To enforce encapsulation
    Answer: b) To define a contract of methods without providing the implementation

150. Which of the following is NOT a valid data type in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) int
  • b) float
  • c) string
  • d) byte
    Answer: d) byte

151. What is the primary use of the void keyword in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To create an object without initializing it
  • b) To indicate that a function does not return any value
  • c) To declare a constant variable
  • d) To define a new data type
    Answer: b) To indicate that a function does not return any value

152. In object-oriented programming, what does "encapsulation" mean?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Storing methods and variables in separate memory spaces
  • b) Hiding the internal details of a class and exposing only necessary functionality
  • c) Inheriting properties from other classes
  • d) Storing multiple classes in a single file
    Answer: b) Hiding the internal details of a class and exposing only necessary functionality

153. Which of the following data structures is used to implement recursive function calls?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

154. Which of the following is true about "method overloading" in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) It allo
  • (HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)
  • ws functions with the same name but different parameters
  • b) It allows functions with the same name and same parameters
  • c) It creates new methods for each function
  • d) It prevents function duplication
    Answer: a) It allows functions with the same name but different parameters

155. What does the term "polymorphism" refer to in object-oriented programming?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Objects sharing the same behavior
  • b) The ability to redefine functions in derived classes
  • c) The ability of a single function to behave differently based on its parameters
  • d) The ability of a function to modify a variable’s type dynamically
    Answer: c) The ability of a single function to behave differently based on its parameters

156. What is the advantage of "call by reference" over "call by value" in C++?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) It allows passing large data structures without copying
  • b) It ensures data security
  • c) It prevents stack overflow
  • d) It reduces the program’s complexity
    Answer: a) It allows passing large data structures without copying

157. In C++, which of the following can be used to access a class’s member function using an object pointer?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) -> operator
  • b) . operator
  • c) :: operator
  • d) * operator
    Answer: a) -> operator

158. What is a key feature of "dynamic memory allocation"?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) The memory is allocated at compile time
  • b) Memory can be allocated or deallocated at runtime
  • c) Memory is allocated using static variables
  • d) Memory allocation is predefined
    Answer: b) Memory can be allocated or deallocated at runtime

159. Which type of inheritance allows a derived class to inherit features from more than one base class?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Single inheritance
  • b) Multiple inheritance
  • c) Multilevel inheritance
  • d) Hierarchical inheritance
    Answer: b) Multiple inheritance

160. In C++, which of the following is used to define a function template?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

Section 2: Computer Graphics (Continued)

161. Which of the following is an example of a 2D transformation in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Rotation
  • b) Translation
  • c) Scaling
  • d) All of the above
    Answer: d) All of the above

162. What is the main purpose of "clipping" in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To remove objects that are outside the viewing area
  • b) To enhance the quality of rendered images
  • c) To increase the speed of rendering
  • d) To create wireframe models
    Answer: a) To remove objects that are outside the viewing area

163. Which algorithm is used for line drawing in 2D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Bresenham's Line Algorithm
  • b) Midpoint Circle Algorithm
  • c) Flood Fill Algorithm
  • d) DDA Algorithm
    Answer: a) Bresenham's Line Algorithm

164. What does the term "viewport" refer to in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) The entire screen where rendering occurs
  • b) The portion of the window where graphics are displayed
  • c) The virtual window used in ray tracing
  • d) A way to zoom in on objects in a 3D scene
    Answer: b) The portion of the window where graphics are displayed

165. Which of the following transformations can be achieved using a 3x3 transformation matrix in 2D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Translation
  • b) Scaling
  • c) Rotation
  • d) All of the above
    Answer: d) All of the above

166. What is the role of the "modelview matrix" in 3D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To store camera settings
  • b) To represent the transformation of objects in the scene
  • c) To manage lighting and shading
  • d) To calculate projection on a 2D screen
    Answer: b) To represent the transformation of objects in the scene

167. Which of the following techniques is used to simulate soft shadows in 3D rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Ray tracing
  • b) Shadow mapping
  • c) Environment mapping
  • d) Ambient occlusion
    Answer: b) Shadow mapping

168. What is "anti-aliasing" in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

169. What is the purpose of a "normal vector" in 3D rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To define the texture coordinates
  • b) To represent the direction perpendicular to a surface
  • c) To define the lighting direction
  • d) To calculate object color
    Answer: b) To represent the direction perpendicular to a surface

170. Which of the following is a method for generating random noise in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Perlin noise
  • b) Depth buffering
  • c) Lambertian shading
  • d) Phong shading
    Answer: a) Perlin noise

171. In OpenGL, what is the purpose of "glEnable(GL_DEPTH_TEST)"?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To enable texture mapping
  • b) To enable depth testing for proper occlusion
  • c) To enable shadow mapping
  • d) To enable color blending
    Answer: b) To enable depth testing for proper occlusion

172. What is the "Gouraud shading" model used for in computer graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) To simulate ambient light
  • b) To interpolate vertex colors across the surface of polygons
  • c) To create shadows in a scene
  • d) To map textures to 3D surfaces
    Answer: b) To interpolate vertex colors across the surface of polygons

173. What does the "Bézier curve" help to generate in 2D graphics?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) A smooth curve defined by control points
  • b) A circle with variable radius
  • c) A polygon with equal sides
  • d) A straight line
    Answer: a) A smooth curve defined by control points

174. In 3D computer graphics, what is the term for converting 3D coordinates to 2D coordinates?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)

  • a) Clipping
  • b) Projection
  • c) Transformation
  • d) Shading
    Answer: b) Projection

175. What is the primary function of the "normal matrix" in 3D rendering?(HPSC/RPSC ASSISTANT PROFESSOR COMPUTER SCIENCE BOOK AND TEST SERIES)


HPSC ASSISTANT PROFESSOR BOOK AND TEST SERIES MCQ PYQ 2025
VIVEK 2 January 2025
Share this post
Tags
Our blogs
Archive