All mock tests are FREE till 31 December — register to save your progress
UGC NET · PAPER 2

UGC NET Paper 2 Computer Science – Unit 3: Programming Languages and Computer Graphics PYQ (June 2025)

10 questions · answer key at the end · updated 11 Oct 2026
Q8. What will be the output of the following C programming code:
int i, j;
for(i=1; i<5; i+=2)
  for(j=1; j<i; j+=2)
    printf("%d", j);
  1. 1
  2. 1 2
  3. 1 3
  4. 1 1 3
Answer & explanation →
Q13. What would be the equivalent pointer expression for referring the array element ar[m][n][0]?
  1. *(*(*(ar) + m + n) + 0)
  2. (*(*(*ar + m) + n) + 0)
  3. (*(*(ar + m) + n) + 0)
  4. *(*(*(ar + m) + n) + 0)
Answer & explanation →
Q31. Which of the following techniques is used for Clipping?
  1. Stack based Seed
  2. Scan Line Seed
  3. Sutherland-Cohen
  4. Inverse Scaling
Answer & explanation →
Q54. Consider the following piece of C programming code:
int x=128, y=110;
do
{
  if(x>y)
    x=x-y;
  else
    y=y-x;
} while(x!=y);
printf("%d",x);
Which one will be the output?
  1. 18
  2. 2
  3. 92
  4. 74
Answer & explanation →
Q57. Match List I with List II
List IList II
A. OverloadingI. Since function call is resolved during run time, the execution is slow.
B. Early bindingII. Since function call is resolved during compilation time, the execution is much faster.
C. OverridingIII. Supports compile-time polymorphism.
D. Late BindingIV. Supports run-time polymorphism.
  1. A-III, B-II, C-I, D-IV
  2. A-IV, B-II, C-III, D-I
  3. A-III, B-II, C-IV, D-I
  4. A-IV, B-I, C-III, D-II
Answer & explanation →
Q59. Consider the following statements for XML (Extensible Markup Language):
A. The number of tags decreases and users can define their own tags.
B. It is used for Presentation.
C. It is case sensitive.
D. It is dynamic.
Which of the above statements are true?
  1. B, C, D Only
  2. A, B, D Only
  3. A, C, D Only
  4. B, D Only
Answer & explanation →
Q63. Match List I with List II
List IList II
A. Oblique ProjectionI. When the direction of projection is so chosen that the lines perpendicular to the plane of projection are foreshortened.
B. Cavalier ProjectionII. When the direction of projection is so chosen that there is no foreshortening of lines perpendicular to the plane of projection.
C. Cabinet ProjectionIII. When the direction of projection is perpendicular to the plane of projection.
D. Orthographic ProjectionIV. When the angle between the projectors and the plane of projection is not equal to 90°.
  1. A-III, B-II, C-IV, D-I
  2. A-IV, B-II, C-I, D-III
  3. A-III, B-I, C-IV, D-II
  4. A-IV, B-I, C-III, D-II
Answer & explanation →
Q65. What will be the output of the following C programming code:
void main()
{
  int *i, a=12, b=2, c;
  c = (a=a+b, b=a/b, a=a*b, b=a-b);
  i = &c;
  printf("%d", --(*i));
}
  1. 91
  2. 90
  3. 98
  4. 92
Answer & explanation →
Q68. Only legal pointer operations:
A. pointer + number → pointer
B. pointer − number → number
C. pointer + pointer → pointer
D. pointer − pointer → pointer
E. pointer − pointer → number
Choose the most appropriate answer from the options given below:
  1. A, B, C Only
  2. A, B, D Only
  3. A, B Only
  4. A, E Only
Answer & explanation →
Q72. Consider the operators used in C Programming given below:
A. &&
B. +=
C. >>
D. >=
E. ?:
Choose the correct order of precedence of the operators given above (higher to lower):
  1. C, D, E, B, A
  2. C, A, D, E, B
  3. C, D, A, E, B
  4. D, C, A, B, E
Answer & explanation →

Answer key

  1. 8 – A
  2. 13 – D
  3. 31 – C
  4. 54 – B
  5. 57 – C
  6. 59 – C
  7. 63 – B
  8. 65 – B
  9. 68 – D
  10. 72 – C