CS135-Review

CS135-Review

Assessment

Flashcard

Science

University

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

15 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What are global variables in C++?

Back

Global variables are variables that are declared outside of any function and can be accessed from any function within the same file.

2.

FLASHCARD QUESTION

Front

What is the impact of using global variables in C++ functions?

Back

They can lead to code that is difficult to understand and maintain due to potential side effects.

3.

FLASHCARD QUESTION

Front

What is the scope resolution operator (::) in C++?

Back

The scope resolution operator is used to define or access variables and functions in a specific scope, particularly to access global variables when a local variable of the same name exists.

4.

FLASHCARD QUESTION

Front

What happens when a function expects a reference parameter in C++?

Back

Any modification to the reference parameter within the function will affect the original variable passed to the function.

5.

FLASHCARD QUESTION

Front

What is the rule regarding default arguments in C++ functions?

Back

Parameters with default values must be the rightmost parameters.

6.

FLASHCARD QUESTION

Front

What happens when an array is passed to a function in C++?

Back

The function receives the address of the first element of the array.

7.

FLASHCARD QUESTION

Front

What is a reference parameter in C++?

Back

A reference parameter allows a function to modify the argument passed to it, as it refers to the original variable.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?