Please answer the following questions 1 through 30 QUESTION

Please answer the following questions 1 through 30

QUESTION 1

The function ____ returns the absolute value of its double-precision argument.

double ceil(double)

double fmod(double)

double fabs(double)

double abs(double)

10 points   

QUESTION 2

char codes[] = \"sample\"; sets aside ____ elements in the codes array.

5

6

7

8

10 points   

QUESTION 3

A ____ is the beginning of a final function that is used as a placeholder for the final function until the function is completed.

function header

function declarator

prototype

stub

10 points   

QUESTION 4

Global variables are only meaningful when used in expressions or statements inside the function that declares them.

True

False

10 points   

QUESTION 5

The items enclosed within the parentheses in a function call statement are called ____ of the function.

parameters

formal parameters

arguments

formal arguments

10 points   

QUESTION 6

Each item in an array is called a(n) ____ of the array.

subscript

variable

index

element

10 points   

QUESTION 7

Each C function is a separate and independent entity with its own parameters and variables.

True

False

10 points   

QUESTION 8

A(n) ____ is a data type with two main characteristics: (1) its values can be decomposed into individual data elements, and (2) it provides an access scheme for locating individual data elements.

data structure

scalar data type

array

atomic data type

10 points   

QUESTION 9

A variable with a ____ scope is simply one that has had storage locations set aside for it by a declaration statement made within a function body.

function

module

local

global

10 points   

QUESTION 10

The four available storage classes are called auto, static, extern, and ____.

stack

intern

void

register

10 points   

QUESTION 11

___ is an example of a function header line.

float roi(int, double);

printf(\"%f\", roi(3, amt));

float roi( int yrs, double rate);

float roi( int yrs, double rate)

10 points   

QUESTION 12

To return a value, a function must use a(n) ____ statement.

exit

throw

break

return

10 points   

QUESTION 13

A(n) ____ variable, is a variable whose value cannot be further subdivided or separated into a built-in data type.

data structure

scalar

array

class

10 points   

QUESTION 14

For one-dimensional arrays, the offset to the element with index i is calculated as ____.

Offset = i * the size of the array

Offset = i * the size of the subscript

Offset = i * the size of a component + 1

Offset = i * the size of an individual element

10 points   

QUESTION 15

A function that calls another function is referred to as the ____.

function prototype

called function

calling function

function declarator

10 points   

QUESTION 16

As long as a function has not returned control to its calling function, all automatic variables local to the function are “alive”; that is, storage for the variables is available.

True

False

10 points   

QUESTION 17

Global variables can be used by all functions in a program that are physically placed after the global variable declaration.

True

False

10 points   

QUESTION 18

The scope of a variable can be thought of as the space within the program where the variable is valid.

True

False

10 points   

QUESTION 19

The function ____ returns the natural logarithm of its argument.

double exp(double)

double log(double)

double log10(double)

double fmod(double)

10 points   

QUESTION 20

The ____ of a variable defines the location within a program where that variable can be used.

storage class

time dimension

scope

data type

10 points   

QUESTION 21

A basic rule of testing states that each function should only be tested in a program in which all other functions are known to be correct.

True

False

10 points   

QUESTION 22

The purpose of the ____ storage class is to extend the scope of a global variable declared in one source code file into another source code file.

auto

static

extern

register

10 points   

QUESTION 23

___ is an example of a function prototype.

float roi(int, double);

printf(\"%f\", roi(3, amt));

roi(3, amt);

float roi( int yrs, double rate)

10 points   

QUESTION 24

The parentheses in a return statement are required.

True

False

10 points   

QUESTION 25

The purpose of a ____ is to operate on the passed data and return, at most, one value directly back to the calling function.

function declarator

prototype

function body

function header

10 points   

QUESTION 26

All ____ arrays are created and destroyed each time the function they are local to is called and completes its execution.

global

static

auto

extern

10 points   

QUESTION 27

Pass by value is also referred to as pass by reference.

True

False

10 points   

QUESTION 28

____ shows a correct array initialization statement.

char codes[6] = [\'s\', \'a\', \'m\', \'p\', \'l\', \'e\'];

char codes[] = (\'s\', \'a\', \'m\', \'p\', \'l\', \'e\');

char codes[] = \"sample\";

char codes[*] = {\'s\', \'a\', \'m\', \'p\', \'l\', \'e\'};

10 points   

QUESTION 29

In a one-dimensional array in C, the first element has an index of ____.

NULL

-1

0

1

10 points   

QUESTION 30

If no class description is included in the declaration statement of a local variable, the variable is automatically assigned to the ____ class.

auto

static

extern

register

double ceil(double)

double fmod(double)

double fabs(double)

double abs(double)

Solution

Question 1:

double fabs(double)

Question 2:

7

Question 3:

Stub

Question 4:

False

Question 5:

Arguments

Please answer the following questions 1 through 30 QUESTION 1 The function ____ returns the absolute value of its double-precision argument. double ceil(double)
Please answer the following questions 1 through 30 QUESTION 1 The function ____ returns the absolute value of its double-precision argument. double ceil(double)
Please answer the following questions 1 through 30 QUESTION 1 The function ____ returns the absolute value of its double-precision argument. double ceil(double)
Please answer the following questions 1 through 30 QUESTION 1 The function ____ returns the absolute value of its double-precision argument. double ceil(double)
Please answer the following questions 1 through 30 QUESTION 1 The function ____ returns the absolute value of its double-precision argument. double ceil(double)
Please answer the following questions 1 through 30 QUESTION 1 The function ____ returns the absolute value of its double-precision argument. double ceil(double)
Please answer the following questions 1 through 30 QUESTION 1 The function ____ returns the absolute value of its double-precision argument. double ceil(double)

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site