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.
- Match List I (programming paradigms) with List II (characteristics). List I: A. Imperative, B. Object-oriented, C. Logic, D. Functional. List II: I. Declarative, clausal representation, theorem proving, II. Side-effect-…
- Suppose you have eight black-and-white images taken with a 1-megapixel camera and one 8-colour image taken with an 8-megapixel camera. How much hard disk space in total do you need to store these images?
- Which of the statements given below are correct? The midpoint (or Bresenham) algorithm for rasterizing lines is optimized relative to DDA algorithm in that A. it avoids round‐off operations. B. it is incremental. C. it…
- What is the transformation matrix that transforms the square with vertices (1, 1), (−1, 1), (−1, −1), (1, −1) into the parallelogram with corresponding vertices (2, 1), (0, 1), (−2, −1), (0, −1)?
- A Bezier curve P(t) is defined by four control points P0 = (−2, 0), P1 = (−2, 4), P2 = (2, 4), P3 = (2, 0). Which statements are correct? A. P(t) has degree 3. B. P(1/2) = (0, 3). C. The curve may extend outside the con…
- Given below are two statements Statement I: The maximum number of sides that a triangle might have when clipped to a rectangular viewport is 6. Statement II: In 3D graphics, the perspective transformation is nonlinear i…
- With 1-byte chars, 2-byte shorts, 4-byte ints and 8-byte doubles, each aligned to its size, no field reordering, and padding for alignment, how much space does this array use? struct { short s; char c; short t; char d;…
- Consider the Java function: public static float f(long m, long n) { float result = (float)m / (float)n; if (m < 0 || n < 0) return 0.0f; else result -= f(m * 2, n * 3); return result; } Which value best approximates f(1…
- In the context of 3D Computer graphics, which of the following statements is/are correct? (A) Under perspective projection, each set of parallel lines in the object do not stay parallel in the image (except those that a…
- Concerning phong shading and Gouraud shading in a 3D scene, which of the following statements are true? (A) Gouraud shading requires more computation than phong shading. (B) Gouraud shading linearly interpolates the col…
- Match List-I with List-II. List I gives matrices representing 2D transformations and List-II shows the corresponding transformation diagrams.
- Given below are different properties of 3D projections from A-D. Identify the correct order on the basis of property true of (i) a perspective projection only, (ii) an orthographic projection only, (iii) both orthograph…
- Given below are two statements: Statement I : Bezier curves are curves that interpolate all of their control points. Statement II : A cubic bezier curve has four control points. In the light of the above statements, cho…
- What is the output? int i, j, x = 0; for (i = 0; i < 5; ++i) for (j = 0; j < i; ++j) { x += (i + j − 1); break; } printf("%d", x);
- Let A be the base class in C ++ and B be the derived class from A with protected inheritance. Which of the following statement is false for class B?
- A rectangle is bounded by x = 0, y = 0, x = 5 and y = 3. The segment joining (−1, 0) and (4, 5), clipped against this window, connects the points
- Which of the following algorithms is not used for line clipping?
- 1024 × 768 If we want to resize a pixels image to one that is 640 pixels wide with the same aspect ratio, what would be the height of the resized image?
- Java Virtual Machine (JVM) is used to execute architectural neutral byte code. Which of the following is needed by the JVM for execution of Java Code?
- Consider the following statements with respect to approaches to fill areas on raster systems : P: To determine the overlap intervals for scan lines that cross the area. Q: To start from a given interior position and pai…
- Which of the following statements are true regarding C ++ ? (a) Overloading gives the capability to an existing operator to operate on other data types. (b) Inheritance in object oriented programming provides support to…
- Which of the following are legal C statements? (a) int *P = &44; (b) int *P = &r; (c) int P = &a; (d) int P = a;
- On a 32-bit x86 machine: typedef struct { union { unsigned char a; unsigned short b; } U; unsigned char c; } S; S B[10]; S *p = &B[4]; S *q = &B[5]; p->U.b = 0x1234; (S takes 32 bits). If M is q − p and N is (int)&(p->c…
- Class Good has a field m and a method public boolean equals(Good n) { return n.m == m; }. In main: Good m1 = new Good(22), m2 = new Good(22); Object s1 = new Good(22), s2 = new Good(22); then it prints m1.equals(m2), s1…
- Consider the following function ) : f n unsigned int (unsigned int )( b = 0 unsigned int ; while (n) { b+ = n&1 ; n ≫>= 1 ; } return b;} ``` f ( The function ) returns the int that represents _P_ the in the binary repre…
- Consider a raster system with resolution 640 by 480 . What size is frame buffer (in bytes) for this system to store 12 bits per pixel?
- Consider the following statements regarding 2D transforms in computer graphics: 1 0 [ ] 2 × 2 S1 : is a matrix that reflects 0 −1 2D X (mirrors) only point about the -axis. 2 × 2 2D S2 : A matrix which mirrors any point…
- In the context of 3D computer graphics, which of the following statements is/are true? P : Orthographic transformations keep parallel lines parallel. Q : Orthographic transformations are affine transformations. Select t…
- Using the phong reflectance model, the strength of the specular highlight is determined by the angle between
- If the frame buffer has 10-bits per pixel and 8- bits are allocated for each of the R, G, and B components, then what would be the size of the color lookup table (LUT) ?