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 the LIST-I with LIST-II LIST-I LIST-II A. long signed int I. %lf B. double II. %Lf C. long double III. %c D. unsigned character IV. %ld Choose the correct answer from the options given below:
- Which of the following are correct about constructors in C++? A. They have the same name as the class. B. They can return values. C. They are called automatically when an object is created. D. They can be overloaded. E.…
- Arrange the following data types in non-decreasing order according to the length of their representation in C++. A. char B. int C. float D. double Choose the correct answer from the options given below:
- Which of the following would be the value of z for the C program code? x = 16; y = 4; z = x >> y;
- What will be the output of the following program? #include<stdio.h> int main() { int i; for (i = 0; i++<10; ) printf("%d", i++); return 0; }
- Match the LIST-I with LIST-II. LIST-I LIST-II A. Pivot point I. Reflection B. Fixed point II. Shear C. Mirror image III. Rotation D. Distortion IV. Scaling Choose the correct answer from the options given below:
- The number of pixel columns divided by the number of scan lines that can be displayed by the system, is called
- The above figure shows a triangle at an original position (vertices labelled 2, 1, 3) to the left of the y-axis, and the same triangle, filled/hatched, at a reflected position (vertices labelled 2, 1, 3) to the right of…
- 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);
- What would be the equivalent pointer expression for referring the array element ar[m][n][0]?
- Which of the following techniques is used for Clipping?
- 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?
- Match List I with List IIList 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 executi…
- 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. Whi…
- Match List I with List IIList 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 t…
- 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)); }
- 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 fr…
- 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):
- Consider the conditional statement if (m == 20 − 10 || n > 10). The order of execution of the following operations is A. == B. − C. || D. > Choose the correct answer from the options given below:
- Which of the following is NOT true about Global Variables?
- Arrange the 2-D viewing transformation pipeline. A. Convert world coordinates to viewing coordinates B. Map viewing coordinates to normalized viewing coordinates using window-viewport specifications C. Construct world-c…
- The entire set of parameters, including the return address, that is stored for a procedure invocation is referred to as
- Consider the following statements:int x = 10, y = 15; x = ((x == y) ? (y + x) : (y - x)); What will be the value of x after executing these statements?
- The major adverse side effects of scan conversion are: A. Staircase appearance B. Unequal brightness of slanted lines C. Picket fence problem D. Rasterization E. Pre-filtering and Post-filtering Choose the correct answe…
- Match List I (Functions) with List II (Uses of functions)List I List II A. fseek() I. Gives the current position in the file B. ftell() II. Sets the position to the beginning of the file C. feof() III. Sets the position…
- Which of the following statements is NOT true?
- The light given off by the phosphor during exposure to the electron beam is known as
- Which of the following statements about pointers in C are TRUE? (A) Pointers can be used to access array elements (B) Pointers can store the address of another pointer (C) Pointers are automatically dereferenced in expr…
- Consider the function in C code:Cal(a, b) { if (b != 1) { if (a != 1) { printf("*"); Cal(a/2, b); } else { b = b - 1; Cal(10, b); } } } How many times will * be printed if the function is called with Cal(10, 10)?
- Which of the following is the correct way to declare a function pointer in C?