COMPUTER GRAPHICS FINAL EXAM REVIEWER

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/285

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:24 PM on 8/29/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

286 Terms

1
New cards

For this course we will be using the DEvC++ IDE. Which version of IDE does this course recommend?

BloodShed

Orwell DevCpp

MingW

GCC

Orwell DevCpp

2
New cards

Vertex Buffer Objects (VBOs) allow vertex data to be uploaded and stored in the video card's memory instead of the system memory.

True

False

True

3
New cards

Which of the following OpenGL functions generates a buffer ID?

glBindBuffer()

glGenBuffers()

glBufferData()

glEnableClientState()

glGenBuffers()

4
New cards

glewInit() must be called before the creation of the OpenGL window.

True

False

False

5
New cards

Which of the following specifies how often data in a VBO will change?

GL_STATIC_DRAW

GL_DYNAMIC_DRAW

GL_STREAM_DRAW

All of the above

All of the above

6
New cards

Matrix multiplication in OpenGL uses 4x4 matrices for transformations.

True

False

True

7
New cards

Which matrix is used to change the position of an object?

Scaling Matrix

Translation Matrix

Rotation Matrix

Identity Matrix

Translation Matrix

8
New cards

When using color arrays, glEnableClientState(GL_COLOR_ARRAY) must be enabled before drawing.

True

False

True

9
New cards

OpenGL's glVertexPointer() function defines an array of vertex data.

True

False

True

10
New cards

In homogeneous coordinates, if w = 1, the vector represents a direction in space.

True

False

False

11
New cards

Which of the following functions is used to render primitives from array data?

glDrawArrays()

glDrawBuffer()

glColorPointer()

glArrayElement()

glDrawArrays()

12
New cards

Using VBOs improves performance because vertex data is stored and processed on the GPU.

True

False

True

13
New cards

What should be called after modifying a mapped buffer object?

glBindBuffer()

glBufferData()

glUnmapBuffer()

glDisableClientState()

glUnmapBuffer()

14
New cards

What is the purpose of glMapBuffer() in VBOs?

To delete the buffer

To map the buffer object into the client's memory

To bind a texture

To clear the color buffer

To map the buffer object into the client's memory

15
New cards

When glMapBuffer() is called, it immediately returns control to the program even if the GPU is still using the buffer.

True

False

False

16
New cards

The glEnableClientState(GL_VERTEX_ARRAY) function is used to enable vertex array usage.

True

False

True

17
New cards

GLUT was originally written by.

Graydon Hoare

James Gosling

Mark Kilgard

Ivan Sutherland

Mark Kilgard

18
New cards

On what version of OpenGL does the original GLUT was abandoned?

3.7

1.7

2.5

4.3

3.7

19
New cards

It is a free-software/open source alternative to the OpenGL Utility Toolkit library.

GCC

MingW

Freeglut

LLVM

Freeglut

20
New cards

What does GLUT stands for?

OpenGL Utility Toolkit

OpenGL Utility Template

OpenGL User Tools

OpenGL User Graphical Text

OpenGL Utility Toolkit

21
New cards

In creating an OpenGL application in Dev-C++, what type of project should be selected?

DLL

Windows Application

Static Library

Console Application

Console Application

22
New cards

Where do you add the include and library folders of freeglut?

Project->Options->Directories

Project->Add To Project

Project->New File

Tools->Package Manager

Project->Options->Directories

23
New cards

What additional command line options do you include for an OpenGL program to work in Dev-C++?

-lfreeglut

-lglu32

-lopengl32

All of the above

All of the above

24
New cards

A command line option needed for the successful compilation of an OpenGL application.

-lfreeglut

-lopengl

-lgraphics

-lfreegl

-lfreeglut

25
New cards

Which of the following is the proper declaration of a pointer?

int *x;

int x;

int &x;

ptr x;

int *x;

26
New cards

OpenGL is best described as:

A graphics hardware device

A computer graphics rendering API

An operating system component

A programming language

A computer graphics rendering API

27
New cards

Which company first developed OpenGL?

Microsoft

Silicon Graphics (SGI)

IBM

Oracle

Silicon Graphics (SGI)

28
New cards

The first version of OpenGL was released in:

1990

1992

1994

1996

1994

29
New cards

OpenGL operates using which model?

Object-Oriented Model

Client-Server Model

Event-Driven Model

MVC Model

Client-Server Model

30
New cards

Which organization currently manages OpenGL standards?

ISO

IEEE

Khronos Group

ACM

Khronos Group

31
New cards

The latest version of OpenGL mentioned in the slides is:

3

4

4.5

5

4.5

32
New cards

In the sample OpenGL program, which function clears the screen buffer?

glEnd()

glBegin()

glClear()

glFlush()

glClear()

33
New cards

Which OpenGL function specifies the start of a primitive?

glStart()

glVertex()

glDraw()

glBegin()

glBegin()

34
New cards

What is the role of glEnd()?

Ends a list of vertices

Ends a program

Clears memory

Closes the window

Ends a list of vertices

35
New cards

Which OpenGL function forces buffered commands to execute?

glClear()

glBegin()

glDrawArrays()

glFlush()

glFlush()

36
New cards

Which keyword is used to define a function in C++?

method

func

function

No keyword required

No keyword required

37
New cards

What is the default return type of a function in C++ if none is specified?

void

int

float

double

void

38
New cards

Which of the following correctly defines a function prototype in C++?

int sum(int, int);

sum(int, int);

function sum(int, int);

prototype sum(int, int);

int sum(int, int);

39
New cards

What is a function that calls itself called?

inline function

overloadded function

recursive function

friend function

recursive function

40
New cards

Which of the following is true about inline functions?

Defined inside a class only

Compiler always expands inline functions

They reduce function call overhead

They can only return integers

They reduce function call overhead

41
New cards

What is the purpose of the return statement?

to stop a loop

to end a function and return a value

to return a value

to allocae memory

to end a function and return a value

42
New cards

Which function type does not return any value?

vois

int

double

char

vois

43
New cards

What happens if a function is declared but not defined in C++?

compiler ignores it

linker error occurs

it runs with default behavior

it is treated as inline

linker error occurs

44
New cards

Which keyword is used to define a function inside a class?

inline function

member

nothing spacial, just declare normally

func

nothing spacial, just declare normally

45
New cards

Which of the following allows multiple functions with the same name but different parameters?

Function overriding

Function overloading

Function templating

Operator overloading

Function overloading

46
New cards

What is computer graphics primarily concerned with?

Group of answer choices

Editing audio

Writing novels

Managing databases

Creating and manipulating visual content using computers

Creating and manipulating visual content using computers

47
New cards

Which programming language is widely used for graphics due to performance and memory control?

Group of answer choices

Ruby

C++

Python

Java

C++

48
New cards

What does GPU stand for?

Group of answer choices

Global Performance Utility

Graphics Processing Unit

Graphical Programming Utility

General Processing Unit

Graphics Processing Unit

49
New cards

Which of the following is a raster graphics format?

Group of answer choices

DWG

SVG

Postscript

PNG

PNG

50
New cards

Which graphics type is scalable without loss of quality?

Group of answer choices

Bitmap

Raster

Pixmap

Vector

Vector

51
New cards

Who is considered a pioneer of computer graphics?

Group of answer choices

Alan Turing

John Carmack

Ivan Sutherland

Tim Berners-Lee

Ivan Sutherland

52
New cards

What is the aspect ratio of a screen with 4 horizontal units and 3 vertical units?

Group of answer choices

1:1

3:4

16:9

4:3

4:3

53
New cards

Which application area uses computer graphics for virtual surgery simulations?

Group of answer choices

Scientific Visualization

Medical Visualization

AR

CAD

Medical Visualization

54
New cards

What does VRAM stand for?

Group of answer choices

Video RAM

Visual RAM

Variable RAM

Virtual RAM

Video RAM

55
New cards

Which bit depth supports 256 tones?

Group of answer choices

4-bit

8-bit

24-bit

16-bit

8-bit

56
New cards

Which rendering algorithm introduced in 1980 simulates global illumination using ray tracing?

Group of answer choices

Anti-aliasing

Ray tracing

Z-buffer

Radiosity

Ray tracing

57
New cards

Which graphics pioneer developed the Sketchpad system?

Group of answer choices

Sutherland

Catmull

Blinn

Warnock

Sutherland

58
New cards

Which lighting model includes ambient, diffuse, and specular components?

Group of answer choices

Gouraud

Phong

Lambert

Blinn

Phong

59
New cards

What is the primary advantage of vector graphics over raster graphics?

Group of answer choices

Smaller file size

Better color depth

Scalability without pixelation

Faster rendering

Scalability without pixelation

60
New cards

Which algorithm solves the visibility problem by sorting surfaces?

Group of answer choices

Z-buffer

Warnock

Appel

Sutherland

Sutherland

61
New cards

Which rendering equation was introduced by Kajiya in 1986?

Group of answer choices

Radiosity

Rendering equation

Ray tracing

Shade trees

Rendering equation

62
New cards

Which bit depth supports over 16 million tones?

Group of answer choices

24-bit

32-bit

8-bit

16-bit

24-bit

63
New cards

Which file format is used for vector graphics in web applications?

Group of answer choices

TIFF

SVG

PNG

JPG

SVG

64
New cards

Which graphics concept studies how humans perceive light and visual information?

Group of answer choices

Simulation

Perception

Visualization

Rendering

Perception

65
New cards

Which graphics technique uses physics to animate models over time?

Group of answer choices

Shading

Modeling

Rendering

Simulation

Simulation

66
New cards

What is one purpose of using functions in programming?

Group of answer choices

To increase memory usage

To reuse abstractions

To complicate the code

To make the program longer

To reuse abstractions

67
New cards

The sqrt() function calculates the square root of a number.

Group of answer choices

False

True

True

68
New cards

Which of the following is a function with no return value and no parameter?

Group of answer choices

int addTwoNumbers(int n1, int n2)

void displayHello()

void printit(int x)

int addTwo()

void displayHello()

69
New cards

The int main() function is the only required function in a C++ program.

Group of answer choices

False

True

False

70
New cards

What does the fabs() function return?

Group of answer choices

The logarithm of a number

The floor of a number

The absolute value of a floating-point number

The cube root of a number

The absolute value of a floating-point number

71
New cards

The pow(x, y) function raises x to the power of y.

Group of answer choices

False

True

True

72
New cards

What is the output of cout << "Hello World..." << endl;?

Group of answer choices

Hello World...

"Hello World..."

cout

endl

Hello World...

73
New cards

What is a function prototype?

Group of answer choices

A declaration that tells the compiler about a function's valid input and output

The main part of a function

The body of a function

A variable that stores a function

A declaration that tells the compiler about a function's valid input and output

74
New cards

What is the value of cbrt(27.0)?

Group of answer choices

-3.0

9.0

3.0

27.0

3

75
New cards

Which of the following is a purpose of the return statement?

Group of answer choices

It tells the computer to leave the function immediately.

It tells the computer to call another function.

It tells the computer to ignore the function.

It tells the computer to repeat the function.

It tells the computer to leave the function immediately.

76
New cards

What is the value of addTwoNumbers(10, 100) given the example code in the presentation?

Group of answer choices

100

50

110

10

110

77
New cards

Which of the following is a key characteristic of a well-defined function according to the presentation?

Group of answer choices

It should perform a single well-defined task.

It should always have a return value.

It should have multiple purposes.

It should be as long as possible.

It should perform a single well-defined task.

78
New cards

Which of the following are examples of functions with a parameter and a return value?

Group of answer choices

void displayHello()

void displaySomething(string str, int count)

int addTwo()

int addTwoNumbers(int n1, int n2)

int addTwoNumbers(int n1, int n2)

79
New cards

What is the output of fmod(13.657, 2.333)?

Group of answer choices

1.992

1.991

13.657

11.324

1.992

80
New cards

What is the output of addTwoNumbers(addTwo(), 100) given the example code?

#include

#include

#include

int result;

int addTwo() {

return 15;

}

int addTwoNumbers(int a, int b) {

return a + b;

}

void display() {

glClear(GL_COLOR_BUFFER_BIT);

std::string text = "Result = " + std::to_string(result);

glColor3f(1.0f, 1.0f, 1.0f);

glRasterPos2f(-0.2f, 0.0f);

for (char c : text) {

glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, c);

}

glFlush();

}

int main(int argc, char** argv)

result = addTwoNumbers(addTwo(), 100);

std::cout << "Result = " << result << std::endl;

glutInit(&argc, argv);

glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);

glutInitWindowSize(400, 200);

glutCreateWindow("Function Output Example");

glClearColor(0.0, 0.0, 0.0, 1.0); // background = black

glutDisplayFunc(display);

glutMainLoop();

return 0;

}

115

81
New cards

What is the purpose of the using namespace std; statement?

Group of answer choices

It creates a new namespace called std.

It includes the standard input/output library.

It is a required part of all C++ programs.

It allows the program to use identifiers from the std namespace without the std:: prefix.

It allows the program to use identifiers from the std namespace without the std:: prefix.

82
New cards

Which of the following is an example of an int function with no parameters?

Group of answer choices

int addTwo()

void printit()

int addTwoNumbers(int n1, int n2)

void displaySomething(string str, int count)

int addTwo()

83
New cards

What does the return 0; statement in int main() typically signify?

Group of answer choices

The program executed successfully.

An error occurred.

The program is about to loop.

A value of 0 is being returned.

The program executed successfully.

84
New cards

A function's "contract" defines its inputs and outputs.

Group of answer choices

False

True

True

85
New cards

What is the value of floor(-9.8)?

Group of answer choices

9.0

10.0

-9.0

-10.0

-10

86
New cards

What does OpenGL stand for?

Group of answer choices

Open Game Library

OpenGL Application

Open Graphics Language

Open Graphics Library

Open Graphics Library

87
New cards

The OpenGL rendering pipeline is a sequence of stages that processes 3D data to produce a 2D image.

Group of answer choices

True

False

True

88
New cards

Which of the following is a fixed-function stage of the OpenGL rendering pipeline?

Group of answer choices

Geometry Shader

Vertex Shader

Fragment Shader

Rasterization

Rasterization

89
New cards

Which company first developed OpenGL?

Group of answer choices

Silicon Graphics

Microsoft

NVIDIA

Khronos Group

Silicon Graphics

90
New cards

The Geometry Shader is a mandatory stage of the rendering pipeline.

Group of answer choices

True

False

False

91
New cards

What is the purpose of the Fragment Shader?

Group of answer choices

To convert primitives into fragments

To process vertex data

To assemble primitives

To determine the final color of a fragment

To determine the final color of a fragment

92
New cards

Which of the following is a geometric primitive in OpenGL?

Group of answer choices

Textures

Spheres

Polygons

Pixels

Polygons

93
New cards

What is a "programmable stage" in the OpenGL pipeline?

Group of answer choices

A stage that cannot be changed

A stage where developers can write custom code called shaders

A stage that only uses fixed functions

A stage for memory management

A stage where developers can write custom code called shaders

94
New cards

What does the glutCreateWindow() function do?

Group of answer choices

Sets the window size

Initializes the OpenGL library

Creates a window on the screen with a specified title

Creates a new thread for the program

Creates a window on the screen with a specified title

95
New cards

What is the purpose of the glFlush() command?

Group of answer choices

To create a new primitive

To clear the color buffer

To close the window

To force buffered OpenGL commands to execute

To force buffered OpenGL commands to execute

96
New cards

What is the Khronos Group?

Group of answer choices

A company that manufactures GPUs

The original developer of OpenGL

An industry consortium that manages open, royalty-free standards

A library for creating 3D graphics

An industry consortium that manages open, royalty-free standards

97
New cards

The glutInit() function must be called before other GLUT and OpenGL functions.

Group of answer choices

False

True

True

98
New cards

What is the purpose of glVertex2f()?

Group of answer choices

To draw a line

To specify a color

To end a list of vertices

To specify the location of a vertex

To specify the location of a vertex

99
New cards

What is the purpose of glutMainLoop()?

Group of answer choices

To define a callback function

To enter an infinite event-processing loop

To clear the window

To draw the primitives

To enter an infinite event-processing loop

100
New cards

What is the term for a property that determines how a primitive is displayed by OpenGL?

Group of answer choices

Primitive

Attribute

Mask

Vertex

Attribute