UGC NET · PAPER 2
UGC NET Paper 2 Computer Science – Unit 3: Programming Languages and Computer Graphics PYQ (June 2025)
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 3
- 1 1 3
Q13. What would be the equivalent pointer expression for referring the array element ar[m][n][0]?
*(*(*(ar) + m + n) + 0)(*(*(*ar + m) + n) + 0)(*(*(ar + m) + n) + 0)*(*(*(ar + m) + n) + 0)
Q31. Which of the following techniques is used for Clipping?
- Stack based Seed
- Scan Line Seed
- Sutherland-Cohen
- Inverse Scaling
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?- 18
- 2
- 92
- 74
Q57. Match List I with List II
| List I | List II |
|---|---|
| A. Overloading | I. Since function call is resolved during run time, the execution is slow. |
| B. Early binding | II. Since function call is resolved during compilation time, the execution is much faster. |
| C. Overriding | III. Supports compile-time polymorphism. |
| D. Late Binding | IV. Supports run-time polymorphism. |
- A-III, B-II, C-I, D-IV
- A-IV, B-II, C-III, D-I
- A-III, B-II, C-IV, D-I
- A-IV, B-I, C-III, D-II
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?
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?
- B, C, D Only
- A, B, D Only
- A, C, D Only
- B, D Only
Q63. Match List I with List II
| List I | List II |
|---|---|
| A. Oblique Projection | I. When the direction of projection is so chosen that the lines perpendicular to the plane of projection are foreshortened. |
| B. Cavalier Projection | II. When the direction of projection is so chosen that there is no foreshortening of lines perpendicular to the plane of projection. |
| C. Cabinet Projection | III. When the direction of projection is perpendicular to the plane of projection. |
| D. Orthographic Projection | IV. When the angle between the projectors and the plane of projection is not equal to 90°. |
- A-III, B-II, C-IV, D-I
- A-IV, B-II, C-I, D-III
- A-III, B-I, C-IV, D-II
- A-IV, B-I, C-III, D-II
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));
}- 91
- 90
- 98
- 92
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:
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:
- A, B, C Only
- A, B, D Only
- A, B Only
- A, E Only
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):
A. &&
B. +=
C. >>
D. >=
E. ?:
Choose the correct order of precedence of the operators given above (higher to lower):
- C, D, E, B, A
- C, A, D, E, B
- C, D, A, E, B
- D, C, A, B, E