All mock tests are FREE till 31 December — register to save your progress
Paper 2 CS · UNIT 03

Programming Languages and Computer Graphics – Previous Year Questions

229 questions from past UGC NET Paper 2 – Computer Science papers, each with the correct answer. Open any question for its explanation.

  1. Multiple Inheritance is permitted directly in..... A. C++ B. Java C. Python D. VB.NET E. BASIC
    Answer: B. A and C Only Paper 2 CS · June 2024 (Cancelled)
  2. Match List-I with List-II :
    Answer: A. A-IV, B-III, C-I, D-II Paper 2 CS · June 2024 (Cancelled)
  3. For line drawing, which of the following algorithms are used ? A. DDA algorithm B. Bresenham algorithm C. Mid point algorithm D. Curve algorithm
    Answer: C. A and B Only Paper 2 CS · June 2024 (Cancelled)
  4. The least values of a signed and unsigned data type variables requiring 8 bits, would be...
    Answer: D. -128,0 Paper 2 CS · June 2024 (Cancelled)
  5. Which of the following statements is TRUE?
    Answer: C. We can never build an object from a class containing a pure virtual function Paper 2 CS · December 2023
  6. The Hue of a color is related to its:
    Answer: D. Wavelength Paper 2 CS · December 2023
  7. Consider the three points P1(1,2,0), P2(3,6,20) and P3(2,4,6) and a view point C(0,0,-10). Choose the correct options. (A) P1 obscure P2, if viewed from C. (B) P2 obscure P1, if viewed from C. (C) P3 does not obscure P1…
    Answer: B. (A), (C) and (D) Only Paper 2 CS · December 2023
  8. Match List - I with List - II.
    Answer: C. (a)-(II), (b)-(III), (c)-(IV), (d)-(I) Paper 2 CS · December 2023
  9. Match List I with List II. List I: A. Bezier curves, B. B-splines, C. Sweep representations, D. Natural objects. List II: I. 3D objects that have translational/rotational symmetry, II. Fractal geometry, III. Bias and te…
    Answer: C. A-IV B-III C-I D-II Paper 2 CS · June 2023
  10. Sutherland Hodgeman method is used on
    Answer: C. Convex polygons Paper 2 CS · June 2023
  11. What is x in the following program? # include < stdioh> int main () {typedef (* (* arrfptr [3])()) [10]; arrfptr x ; return 0; }
    Answer: C. x is an array of three function pointer Paper 2 CS · June 2023
  12. The clipping process in computer graphics is used for
    Answer: D. Removing objects and lines Paper 2 CS · June 2023
  13. Consider the rectangle with vertices (0, 0), (0, 2), (3, 0), (3, 2) . There is scaling of 2 towards x -axis and 3 towards y -axis. The new cordinates of the rectangle are
    Answer: C. (0, 0), (6, 0), (0, 6), (6, 6) Paper 2 CS · June 2023
  14. Which of the following transforms in 2 dimension is used to resize a 2-dimensional object?
    Answer: C. Scaling Paper 2 CS · June 2023
  15. Given int arr[3][4][2] = {{{2,4},{7,8},{3,4},{5,6}}, {{7,6},{3,4},{5,3},{2,3}}, {{8,9},{7,2},{3,4},{5,1}}}; which of the following can be used to refer to the element 1?
    Answer: B. *(*(*(arr + 2) + 3) + 1) Paper 2 CS · December 2022 (Shift 1)
  16. Which of the following is correct using the constructor? A. string s1; B. string s2 (s1); C. string s3{7}; D. string s4{'a'}; E. string s5{7, 'a'};
    Answer: A. A, B, D, E only Paper 2 CS · December 2022 (Shift 1)
  17. Match List I with List II
    Answer: B. A-III, B-I, C-IV, D-II Paper 2 CS · December 2022 (Shift 1)
  18. Which of the following is wrong about the data types?
    Answer: C. The range of values for signed data types is more than that of unsigned data ty… Paper 2 CS · December 2022 (Shift 2)
  19. If a constructor 'Date' is declared explicitly and has to be defined outside the class, which of the Q following is correct?
    Answer: A. Date::Date(int dd) {/ *... * /} Paper 2 CS · December 2022 (Shift 2)
  20. Given a vector with Cartesian components (x, y), if scaling is done with the matrix [0.5 0; 0 1.5], which of the following are true? 1. Decreases the vertical by three halves 2. Increases the vertical by three halves 3.…
    Answer: D. 2 and 4 only Paper 2 CS · December 2022 (Shift 2)
  21. Match the List-I and List-II d.To gain access to IV. to use explicit differing instances for casting derived classes through base we have Choose the correct answer from the options Q given below:
    Answer: B. a-III, b-I, c-II, d-IV Paper 2 CS · December 2022 (Shift 2)
  22. In what sequence the initialization, testing and execution of body is done while using do-while loop? I. Commenting II. Execution of the body III. Initialisation IV. Testing the condition Choose the correct answer from…
    Answer: D. III, II, IV Paper 2 CS · December 2022 (Shift 2)
  23. Assertion A: A Raster scan device is a CRT graphic device and can use a television monitor for display Reason R: In Raster scan display the picture is composed of Q a series of dots. These dots are traced out as a serie…
    Answer: A. Both A and R are true and R is the correct explanation of A Paper 2 CS · December 2022 (Shift 2)
  24. The hidden surface removal problem with a minimal 3D pipeline can be solved with
    Answer: A. Painter's algorithm Paper 2 CS · September 2022
  25. The transformation [x̄ ȳ z̄ w̄]ᵀ = [a1 b1 c1 d1; a2 b2 c2 d2; a3 b3 c3 d3; e f g h] · [x y z 1]ᵀ is called
    Answer: C. Homography Paper 2 CS · September 2022
  26. Of the following, which is NOT a logical error?
    Answer: D. Using commas instead of the two required semicolons in a for loop header Paper 2 CS · September 2022
  27. Which statement is false?
    Answer: C. Call by value is always more efficient than call by reference Paper 2 CS · September 2022
  28. What does the following C function f() return? int f(unsigned int N) { unsigned int counter = 0; while (N > 0) { counter += N & 1; N = N >> 1; } return counter == 1; }
    Answer: B. 1 if N is a power of 2 , otherwise 0 Paper 2 CS · November 2021
  29. Consider the following recursive Java function: public static String F(int N) { if (N <= 0) return "-"; return F(N - 3) + N + F(N - 2) + N; } The value of F(5) is:
    Answer: D. -2-25-3-1-135 Paper 2 CS · November 2021
  30. Match List I (programming terms) with List II (meaning). List I: A. JNDI, B. RMI, C. JDK, D. JRE. List II: I. Runtime support for running Java programs, II. The API in support of naming and directory services, III. The…
    Answer: A. A-II, B-III, C-IV, D-I Paper 2 CS · November 2021