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. Pointers cannot be used to
    Answer: B. reference a value directly Paper 2 CS · September 2022
  2. Which mechanism in XML allows organisations to specify globally unique names as element tags in documents?
    Answer: D. namespace Paper 2 CS · September 2022
  3. The following transformation (with general entries in all four rows) is called[x'] [a1 b1 c1 d1] [x] [y'] = [a2 b2 c2 d2] [y] [z'] [a3 b3 c3 d3] [z] [w'] [e f g h ] [1]
    Answer: C. Homography Paper 2 CS · September 2022
  4. A top-down approach to programming calls for: Statement I: Working from the general to the specific. Statement II: Postponing the minor decisions. Statement III: A systematic approach. Statement IV: Intermediate coding…
    Answer: C. Statements I, II and III only Paper 2 CS · September 2022
  5. Which of the following 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
  6. Which statement is false?
    Answer: C. Call by value is always more efficient than call by reference. Paper 2 CS · September 2022
  7. The steps for analysis and design of object oriented system: (A) Draw interaction diagrams (B) Draw state chart and object diagram (C) Draw use case and activity diagram (D) Draw component and deployment diagram (E) Dra…
    Answer: D. (C) → (A) → (E) → (B) → (D)
  8. Given below are two statements: Assertion A: Cohesion is a qualitative indication of the degree to which a module can be written more compactly and is able to complete its function in a timely manner. Reason R: Cohesion…
    Answer: C. A is correct but R is not correct
  9. Modules X and Y operate on the same input and output, then the cohesion is
    Answer: D. Communication cohesion
  10. Arrange the following types of Cohesion from best to worst type. A. Logical Cohesion B. Sequential Cohesion C. Communication Cohesion D. Temporal Cohesion E. Procedural Cohesion Choose the correct answer from the option…
    Answer: D. B → C → E → D → A Paper 2 CS · November 2020
  11. Which of the following UML diagrams has a static view?
    Answer: B. Use-Case diagram Paper 2 CS · November 2020
  12. Which of the following statements is/are TRUE? P: In software engineering, defects that are discovered earlier are more expensive to fix. Q: A software design is said to be a good design, if the components are strongly…
    Answer: B. Q only Paper 2 CS · June 2019
  13. 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 g…
    Answer: B. P and R only Paper 2 CS · December 2018
  14. Match each UML diagram in List-I with the appropriate description in List-II: List-I (a) State Diagram (b) Use-Case Diagram (c) Class Diagram (d) Activity Diagram List-II (i) Describes how the external entities (people,…
    Answer: C. (a)-(iv), (b)-(i), (c)-(ii), (d)-(iii) Paper 2 CS · December 2018
  15. Coupling is a measure of the strength of the interconnections between software modules. Which of the following are correct statements with respect to module coupling? P: Common coupling occurs when one module controls t…
    Answer: C. Q and R only Paper 2 CS · July 2018
  16. A software design pattern often used to restrict access to an object is:
    Answer: D. proxy Paper 2 CS · July 2018
  17. Consider the following statements regarding software architecture: S1: Coupling is a measure of how well the things grouped together in a module belong together logically. S2: Cohesion is a measure of the degree of inte…
    Answer: B. Only S3
  18. A software design pattern used to enhance the functionality of an object at run-time is:
    Answer: B. Decorator
  19. Module design is used to maximize cohesion and minimize coupling. Which of the following is the key to implement this rule?
    Answer: C. Encapsulation
  20. The design concept 'Refinement' is a:
    Answer: D. All of the above
  21. A software design is highly modular if:
    Answer: A. Cohesion is functional and coupling is data type
  22. Cohesion is an extension of:
    Answer: C. Information hiding concept
  23. Given 4 GB (≈ 4.3 × 10⁹ bytes) of virtual address space and a page size of 4 KB (= 4 × 10³ bytes), with each page table entry 5 bytes: how many virtual pages would this imply, and what is the size of the whole page tabl…
    Answer: D. None of the above
  24. A table T with 17 rows and 1024 columns is stored in memory. T[i][j] and the variable temp are 32-bit floating-point values; memory is word-addressable (1 word = 1 element) and temp is kept in a processor register (no m…
    Answer: A. 0
  25. Using the same table T (17 rows × 1024 columns, 32-bit word-addressable entries, 16 page frames of 1024 words each, LRU) and the same column-averaging program as above, now consider T stored in column-major format. How…
    Answer: D. 17
  26. Using the same table T (17 rows × 1024 columns, 32-bit word-addressable entries, 16 page frames of 1024 words each, LRU) and the same column-averaging program as above, now consider T stored in row-major format. How man…
    Answer: B. 17,408
  27. Using the same table T (17 rows × 1024 columns, 32-bit word-addressable entries, 16 page frames of 1024 words each, LRU) and the same column-averaging program as above, now consider T stored again in column-major format…
    Answer: D. 99.9%
  28. Using the same table T (17 rows × 1024 columns, 32-bit word-addressable entries, 16 page frames of 1024 words each, LRU) and the same column-averaging program as above, what is the ratio of the number of page faults wit…
    Answer: A. 1024 : 1
  29. A virtual memory system uses the first-in-first-out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Assertion A: Increasing the number of page frames allocated to a process sometimes…
    Answer: B. Both A and R are true but R is NOT the correct explanation of A
  30. Which of the following statement(s) is/are correct with respect to virtual memory? Statement I: Address translation is performed for every logical address used during the execution of a program. Statement II: A program…
    Answer: C. Statement I is correct but Statement II is incorrect