Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

-----need help urgently!! help with these questions, please. I have tried to do

ID: 3643070 • Letter: #

Question

-----need help urgently!! help with these questions, please. I have tried to do them, but failed miserably.



CSC 134 Programming Language


Question 1

In random number generations, shiftingValue is equal to the number in the desired range of consecutive integers and scalingFactor is equal to the of the desired range of consecutive integers.


Question 2

Function can be used to round a number to a specific decimal
place. The statement
y = floor( x * 10 + .5 ) / 10



Question 3

When an argument is passed by , a of the argument

Explanation / Answer

Question 1
In random number generations, shiftingValue is equal to the number in the desired range of consecutive integers and scalingFactor is equal to the of the desired range of consecutive integers.
Random number generators often return numbers in some limited range, typically 0 to b for some upper bound b. Sometimes you need your random numbers to lie in a different range. You can make random numbers lie in a longer or shorter range by multiplying them by a scale factor (scaling). You can make random numbers lie in a range that is shifted to higher or lower numbers than the original by adding (or subtracting) an offset from the random numbers (translating).

Question 2
Function can be used to round a number to a specific decimal
place. The statement y = floor( x * 10 + .5 ) / 10
Question not clear


Question 3

When an argument is passed by value , a copy of the argument’s value is made and passed
to the called function. Changes to the copy do not affect the original variable’s value in the caller.


Question 4

When a program omits an argument for a parameter with a default argument, the compiler inserts the _default_ value of that argument to be passed to the function call.


Question 5

With____call by reference_, the caller gives the called function the ability to access the caller’s data directly and to modify it if the called function chooses to do so.


Question 6

All operations performed on a reference are actually performed on the _original__ variable.


Question 7

C++ provides the unary scope resolution operator, which is ::, to access a global variable when
a local variable of the same name is in scope.



Question 8

C++ enables several functions of the same name to be defined, as long as they have different
signatures. This is called function __overloading___.


Question 9

Function overloading is used to create several functions of the same name that perform
similar tasks, but on _difference_ data types.

Question 10

The compiler encodes each function identifier with the number and types of its parameters (sometimes referred to as name
mangling or name decoration) to enable _type-safe__ linkage.


Question 11

C++ provides the _switch_ multiple-selection statement to perform many different actions
based on the possible values of a variable or expression.


Question 12

The statement break, when executed in a while, for, do…while or switch statement,
causes exit from that statement.

Question 13

The _continue__ statement, when executed in a while, for or do…while statement, skips
the remaining statements in the body of that statement and proceeds with the next iteration
of the loop.