CS135-Review

CS135-Review

Assessment

Flashcard

Science

University

Practice Problem

Hard

Created by

Wayground 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.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Science