If i were to declare a function as follows nbsp nbsp void


If I were to declare a function as follows:

    void increment(int* pX);

This function WILL be able to alter the value of the integer that was used as the argument.

Select one:

TrueFalse

When an argument is passed-by-value, changes in the called function __________ affect the original variable's value;  when an argument is passed call-by-reference, changes in the called function __________ affect the original variable's value.

Select one:

a. Do not, dob. Do not, do notc. Do, dod. Do, do not.

What is the type of the variable p in the following statement?

       int  *p;

Select one:

a. pointer-to-intb. reference-to-intc. intd. pointer-to-reference-to-int

Overloaded functions must have:

Select one:

a. Different parameter lists.b. Different return types.c. The same number of parameters.d. The same number of default arguments

An activation record will be popped off the function call stack whenever:

Select one:

a. A function returns control to its caller.b. A function calls another function.c. A function calls itself.d. A function declares a local variable

Functions can:

Select one:

a. Be used as building blocks to create new programs.b. Return a result to the caller function.c. Be reused any number of times.d. Do all of the above.

A recursive function is a function that

Select one:

a. Returns a doubleb. takes 3 argumentsc. calls itself, either directly, or indirectlyd. is inside another function

f a set of functions have the same program logic and operations and differ only in the data type(s) each receives as argument(s) then a(n) __________ should be used.

Select one:

a. overloaded functionb. recursive functionc. macrod. function template

All of the following are true of functions except:

 

Select one:

a. They define specific tasks that can be used at many points in a program.b. A function call must specify the name and arguments of the function.c. A function signature does not need to appear in the code before the first time it is usedd. The implementation of a function is hidden from the caller.

A class definition has:

Select one:

a. member functionsb. member datac. a main methodd. a and b

The function prototype 

      double mySqrt( int x );

Select one:

a. Declares a function called mySqrt which takes an integer as an argument and returns a double.b. Defines a function called double which calculates square roots.c. Defines a function called mySqrt which takes an argument of type x and returns a double.d. Declares a function called mySqrt which takes a double as an argument and returns an integer.

Which of the following are correct with regard to pointers:

Select one:

a. A pointer is a memory addressb. A pointer contains a hexidecimal numberc. A pointer can be NULL or 0d. A pointer can be used to store  the memory address of a variablee. all of the above

What happens when two blocks, one nested inside of the other, both declare variables with the same identifier? (Assume that the outer block declares its variable before the opening left-brace of the inner block.)

Select one:

a. A syntax error occurs.b. The "outer" variable is hidden while the "inner" variable is in scope.c. The "outer" variable is irretrievably lost when the "inner" variable is declared.d. The "inner" declaration is ignored and the "outer" variable has scope even inside the inner block

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: If i were to declare a function as follows nbsp nbsp void
Reference No:- TGS01365437

Expected delivery within 24 Hours