Question: Stuck on some questions for c++ A function prototype is placed before int main(). true false 2 points Question 2 What does the letter D

Stuck on some questions for c++

A function prototype is placed before int main().

true

false

2 points

Question 2

What does the letter "D" look like inside the computer?

d

D

decimal 68

decimal 100

2 points

Question 3

How does a function report its result back to its calling (or boss) function if there is a value to be reported back?

By storing the result into one of the variables passed as an argument.

By storing the result directly into the caller's variable.

By cout-int the result to the screen.

By asking the user to do it.

By executing a return statement with the result.

2 points

Question 4

What will happen if a variable of type char called ch is typecasted as an integer and cout-ed? cout << (int) ch;

The character will be displayed

The cout statement will produce a run-time error

The ASCII value of the character will be displayed

The cout statement will not compile

2 points

Question 5

If (var ==false) is testing a:

a string

a character

a boolean variable

an array

2 points

Question 6

A table is defined as int Array[500]={1,2} How many zeros are in the table?

No zeros are in the table.

1

2

498

500

2 points

Question 7

A copy is made of a variable when you call by ____________

reference

address

copy

value

2 points

Question 8

What is used to show a call by reference?

& is coded on the call to the function

& is coded on the function prototype

The data type is coded on the function prototype.

Const is coded on the function prototype.

2 points

Question 9

Which of the following "chunks" of C++ code will print the contents of an array called ar that has been defined to hold 25 integer values and has been initialized with 25 integer values.

cout << ar;

for( int sub = 0; sub == 25; sub++ )
 cout << ar[sub] << " ";

for( int sub = 0; sub < 25; sub++ )

cout << ar[sub] << " ";

for( int sub = 0; sub <= 25; sub++ );

cout << ar[sub] << " ";

2 points

Question 10

What is the subscript of the last element in the array Table if is defined as follows: float Table[30];

30

31

29

0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!