click below
click below
Normal Size Small Size show me how
elective 2
| Question | Answer |
|---|---|
| A command line option needed for the successful compilation of an OpenGL application. a) -glu32 b) -lglut32 c) -gl32 d) -lfreeglut | d) -lfreeglut |
| A Symbol used to determine the address of a variable or simply called the address-of operator. a) & b) * c) % d) @ | a) & |
| What is the last legal subscript that can be used with the following array? int values[5]; a) 6 b) 5 c) 0 d) 4 | d) 4 |
| What is the output of the following C program with functions and pointers? void myshow(int *); void main() { int a=10; printf("%d ", a); myshow(&a); printf("%d", a); } void myshow(int *k) { *k=20; } a) 10 10 b) 10 20 c) 20 10 d) 20 20 | b) 10 20 |
| What will be the output of the program? int fun(int i){ i++; return i; } int main(){ int fun(int); int i=3; fun(i=fun(fun(i))); printf("%d\n", i); return 0; } a) Garbage Value b) Error c) 5 d) 4 | c) 5 |
| What will be the output of the following C code? void m(int k){ printf("hi"); } void m(double k){ printf("hello"); } void main(){ m(3); } a) hi b) hello c) Compile time error d) Runtime error | c) Compile time error |
| What file do you need to copy for your OpenGL application to run. a) freeglut.dll b) glut32.lib c) gltools.h d) opengl32.lib | a) freeglut.dll |
| In pointer p, the expression *(p+1) is equivalent to p[1]. a) True b) False | a) True |
| To move the pointer p to the next location in an array we use *p+=1;. a) True b) False | b) False |
| Which of the following gives the memory address of a variable pointed to by pointer a? a) *a b) &a c) a d) value(a) | c) a |
| OpenGL’s architecture is a client-server model where the client is the application and the server is the _______________. a) Video Card b) Code Server c) Internet Server d) Device Driver | a) Video Card |
| In the OpenGL Rendering pipeline it is the Shader stage that will process a Fragment generated by the Rasterization into a set of colors. a) Geometry Shader b) Vertex Shader c) Per-Sample Operations d) Fragment Shader | d) Fragment Shader |
| In the OpenGL Rendering pipeline it is where increases the number of polygons to smoothen out the object. a) Primitive Assembly b) Geometry Shader c) Rasterization d) Tessellation | d) Tessellation |
| The glutInitWindowPosition(0,0) makes the upper left corner of the window as a reference to be placed at what position in the screen. a) Upper Left b) Upper Right c) Bottom Left d) Bottom Right | a) Upper Left |
| _____________ is an OpenGL function specifies the beginning of an object of type mode. a) glClear() b) glFlush() c) glBegin() d) glVertex() | c) glBegin() |
| The function call glutDisplayFunc(display) is a callback function where display() is called only once in the whole lifetime of a program. a) True b) False | b) False |
| _____________ is an OpenGL function specifies the end of a list of vertices. a) glVertex() b) glBegin() c) glEnd() d) glClear() | c) glEnd() |
| _____________ is an OpenGL function forces previously buffered OpenGL commands to execute. a) glBegin() b) glClear() c) glVertex() d) glFlush() | d) glFlush() |
| What OpenGL attribute command sets the width of the lines. a) glLine() b) glLineWidth() c) glLineWeight() d) glLineSize() | b) glLineWidth() |
| How many bits does the glLineStipple() function pattern represent to describe a line pattern. a) 8 b) 32 c) 64 d) 16 | d) 16 |
| What does the letter f suffix in the glVertex2f() function refer to? a) None of the above b) Tells that you are specifying a position c) The data type of the coordinates d) The last character f is mandatory for using glVertex | c) The data type of the coordinates |
| The command used to enable line style pattern in OpenGL. a) GL_LINE b) GL_LINE_PATTERN c) GL_LINE_STIPPLE d) GL_LINE_LOOP | c) GL_LINE_STIPPLE |
| What does the number suffix in the glVertex2f() function refer to? a) No of function parameters b) No of colors to be used c) The maximum value of the coordinates d) None of the above | a) No of function parameters |
| The color white is represented by the command glColor3f(0.0f,0.0f,0.0f). a) True b) False | b) False |
| What is the minimum number of vertex specifications in using GL_QUADS. a) 3 b) 2 c) 4 d) 5 | c) 4 |
| What is the minimum number of vertex specifications in using GL_POLYGON. a) 3 b) 4 c) 2 d) 5 | b) 4 |
| In the glColor4f() function what does the 4th parameter represent. a) Red b) Green c) Blue d) Alpha | d) Alpha |
| Shaders are required to create an OpenGL application. a) True b) False | b) False |
| In the OpenGL Rendering pipeline it is the stage that handles the processing of individual vertices. a) Vertex Shader b) Per-Sample Operations c) Vertex Post Processing d) Primitive Assembly | a) Vertex Shader |
| OpenGL is a part of the _____________ Visual Computing Ecosystem. a) Parallel Computation b) 3D Graphics c) 3D Assets d) Portable XR | b) 3D Graphics |
| In the OpenGL Rendering pipeline it is where shapes are being corrected for possible detection of gaps on the surface so there would be no gaps. a) Rasterization b) Primitive Assembly c) Tessellation d) Per-Sample Operations | c) Tessellation |
| A glut function that makes the program to enter an infinite event-processing loop. It should be the last statement in the main() function. a) glutDisplayFunc() b) glutInit() c) glutMainLoop() d) glutCreateWindow() | c) glutMainLoop() |
| _____________ is an OpenGL function specifies the location of the vertex. a) glFlush() b) glClear() c) glBegin() d) glVertex() | d) glVertex() |
| You use the command glVertex2fv() when you refer to a data that is in the array. a) True b) False | a) True |
| GL_LINES needs two glVertex2f() commands to render a line. a) True b) False | a) True |
| In the glColor3f() function what does the 2nd parameter represent. a) Blue b) Alpha c) Green d) Red | c) Green |
| b) A triangle will be rendered and the excess vertex will be ignored | |
| In the OpenGL Rendering pipeline it is where Fragments output from a Fragment Shader are processed, and their resulting data are written to various buffers. a) Geometry Shader b) Per-Sample Operations c) Fragment Shader d) Vertex Shader | b) Per-Sample Operations |
| What group is responsible for managing the OpenGL specification. a) SGI b) Google c) Apache d) Khronos | d) Khronos |
| OpenGL was designed to be _______________________. a) Operating System Independent b) All of the above c) Fast and Lightweight d) Object-Oriented | b) All of the above |
| _____________ is the header file to be included to use the GLUT library. a) opengl.h b) glut.h c) gl.h d) freeglut.h | b) glut.h |
| The glutInitWindowSize(param1,param2) parameters specifies the __________________ of a window. a) Bottom, Top b) Height, Width c) Top, Bottom d) Width, Height | d) Width, Height |
| _____________ is an OpenGL function clears all buffers whose bits are set in mask. GL_COLOR_BUFFER_BIT refers to the color buffer. a) glClear() b) glVertex() c) glBegin() d) glFlush() | a) glClear() |
| How many OpenGL Primitives are there in the OpenGL API? a) 10 b) 8 c) 7 d) 9 | a) 10 |
| GL_POINTS needs two glVertex2f() commands to render a point. a) True b) False | b) False |
| It is required for OpenGL to enable Line Stippling before changing the line style pattern. a) True b) False | a) True |