Question: 1. Generally, we DON'T need to write error handlers (namely, functions that are designed to catch input, functional, or output errors) for errors caught at

1. Generally, we DON'T need to write error handlers (namely, functions that are designed to catch input, functional, or output errors) for errors caught at compile time.

True
False

2.This question may have 0 to multiple answers. Choose all that apply. Which of the following is TRUE about a function:

A Passing lots of arguments into a function is costly compared to alternatives.
B Having too many function calls in a program slows it down.
C A function declaration tells the compiler about a function's name, return type, and parameters.
D A function can return AT MOST 1 value back to its caller.

3.When passing an array into a function, we must also pass in the array's size into the function.

A True
B

False

4. This question may have 0 to multiple answers. Choose all that apply. Converting from data type _______ to data type ______ will result in the loss of data.

A short, long
B float, double
C int, char
D char, bool
E None of the choices.

5. A data type that can have values ONLY between the range 0 to 65535 is a:

A

2-byte int
B 4-byte int
C 2-byte unsigned int
D 4-byte unsigned int

6. This question may have 0 to multiple answers. Choose all that apply. How do you concatenate two C++ strings, str1 and str2?

A concate(str1, str2);
B strconcate(str1, str2);
C str1 = str2;
D str1.add(str2);
E str1 += str2;

7. Based on the Problem Description, we need to keep the character count for every one of the 128 possible characters. Which of the following statements illustrates the use of arr (array created from the last problem) to increment the ASCII_CHARACTER count by 1? ASCII_CHARACTER can be any one of the first 128 characters in the ASCII Table (Links to an external site.)Links to an external site. (not the Extended ASCII Table).

A arr[ASCII_CHARACTER-97]++;
B arr[ASCII_CHARACTER] = ASCII_CHARACTER++;
C arr[ASCII_CHARACTER]++;
D arr[ASCII_CHARACTER-65]++;
E None of the choices.

8. Based on the Problem Description, the input may be the combination of any one of the 128 characters in the ASCII table (Links to an external site.)Links to an external site.. Write a STATEMENT (not the entire program) to create/instantiate an array of 128 characters called arr.

9.This question may have 0 to multiple answers. Choose all that apply. Assuming var is an int:

A var++ adds 1 to var, returning the new var before the semicolon.
B ++var adds 1 to var, returning the new var before the semicolon.
C var++ adds 1 to var, returning the old var before the semicolon.
D ++var adds 1 to var, returning the old var before the semicolon.
E None of the choices.

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!