Question: 11... Why use modular compilation? Select one: a. To improve the executables computation performance. b. To reduce the time required to recompile the executable. c.

11...

Why use modular compilation?

Select one:

a. To improve the executables computation performance.

b. To reduce the time required to recompile the executable.

c. To save the programmer the hassle of finding all the dependencies.

d. Because file linking is necessary.

12...

Which function is called in the following code?

double CalcFt(double inches) {

return inches * 12.0;

}

int CalcFt(int inches) {

return inches * 12;

}

int main() {

int inches = 24;

cout << CalcFt(24);

return 0;

}

Select one:

a. double CalcFt(double inches)

b. int CalcFt(int inches)

c. Both functions are called.

d. Error: Cannot given same name to multiple functions.

13....

Given the command-line argument:

a.out Jane Doe 23 Ben Smith 22

What is the output of the following program myprog.exe?

int main(int argc, char* argv[]) {

cout << argc;

return;

}

Select one:

a. 7

b. 6

c. 5

d. 4

14....

Where does the preprocessor look for std in the line:

using namespace std;

Select one:

a. The same directory/folder as the including file.

b. The systems standard library directory/folder.

c. Custom files cannot be included without < > notation.

d. Nowhere, preprocessor only looks at lines starting with #.

15.....

void PrintName() {

cout << "First name is Tom. ";

cout << "Last name is Jones." << endl;

return;

}

int main() {

PrintName();

PrintName();

return 0;

}

How many output statements would execute in total?

Select one:

a. 1

b. 2

c. 4

d. 8

16....

The following is an example of a function stub:

int CountOfAlpha(string input) {

return 0;

}

Select one:

a. True

b. False

17...

Which of the following is NOT a benefit of separate files:

Select one:

a. Separate files insures that main does not grow too large.

b. Separate files increases compilation speed.

c. Separate files allows the separated files to be used in other programs.

d. All of the above are benefits.

18....

Which function evaluates whether a character c is uppercase?

Select one:

a. isalnum(c)

b. isalpha(c)

c. toupper(c)

d. isupper(c)

19.....

Define a character array named stateName with 50 elements and initialize the array to the string (without spaces): Kansas.

Select one:

a. char stateName[50] = Kansas;

b. char stateName[50] = Kansas;

c. char stateName(50) = Kansas;

d. char stateName[50]; stateName = Kansas;

20.....

Given the following makefile:

driveSim.exe : main.o carFcts.o

g++ main.o carFcts.o -o driveSim.exe # (1)

main.o : main.cpp carFcts.h

g++ -Wall -c main.cpp # (2)

carFcts.o : carFcts.cpp carFcts.h

g++ -Wall -c carFcts.cpp # (3)

Assume that make has already run. Which commands will be executed if carFcts.h is changed and make is called?

Select one:

a. (1), (2), (3)

b. (2), (3)

c. (1), (2)

d. (1), (3)

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!