saint com207 final exam latest 2017

Question # 00579586
Course Code : Com207
Subject: Computer Science
Due on: 11/21/2017
Posted On: 11/21/2017 10:35 AM
Tutorials: 1
Rating:
4.9/5
Question Dot Image

Module 8 final exam

Question 1 You can use the built-in C++ __________ function to raise a number to a power and then return the result as a double number.

xy()

raise()

pow()

power()

Question 2 A(n) __________ is a block of code that performs a task.

program

expression

statement

function

Question 3 Unless specified otherwise, variables are passed by __________ in C++.

reference

copy

address

value

Question 4 For a program to create a file object, it must contain the __________ directive.

#include <ostream>

#include <fstream>

#include <iostream>

#include <istream>

Question 5 A __________ function uses its return value to send information back to the function that called it.

value-returning

built-in

program-defined

void

Question 6 Of the formal parameters in the replace function, __________ is optional.

replacementString

count

none of the above

subscript

Question 7 The __________ statement replaces the letter located in position 3 in the item variable, with the letter “D”.

item.replace("D", 3);

item.replace(3, 1, "D");

item.replace(3, "D");

item.replace(1, 3, "D");

Question 8 __________ declares and initializes a five-element double array named prices; the first element is initialized to 6.5, while the others are initialized to 0.0.

double prices[5] = {6.5,,,,};

double prices[] = {6.5};

double prices[] = {6.5,,,,};

double prices[5] = {6.5};

Question 9 The statement __________ opens the payroll.txt file for output.

outFile.open(ios::app, "payroll.txt");

outFile.open(ios::out, "payroll.txt");

outFile.openOut("payroll.txt");

outFile.open("payroll.txt");

Question 10 Executing:

string phone = "3120501111";

phone.insert(0, "(");

phone.insert(__________ , ")"); // Fill in the blank

phone.insert(8, "-");

changes the contents of the phone variable to “(312)050-1111”.

5

3

4

6

Question 11 Every C++ program contains at least one function: __________.

return()

rand()

main()

pow()

Question 12 When passing a two-dimensional array, the __________ set of square brackets in the formal parameter of a function header or prototype may be left empty.

both first and second

first

neither first nor second

second

Question 13 Connecting strings together is called __________.

concatenating

joining

uniting

linking

Question 14 A(n) __________ is a group of variables that have the same name and data type and are related in some way.

scalar variable

array

object

class

Question 15 _________ assigns a user-entered value to the element located in the third row, second column of the grades array.

cin<< grades[2][1];

cin<< grades[3][2];

cin>> grades[3][2];

cin>> grades[2][1];

Question 16 When referring to an element in an array, the element’s subscript must be placed between __________.

[]

‘’

“”

{}

Question 17 __________ assigns the character F to the variable located in the second row, first column of the grades array.

grades[1][0] = 'F';

grades[0][1] = 'F';

grades[1][2] = 'F';

grades[2][1] = 'F';

Question 18 The __________ is the Not logical operator in C++.

~

!

#

^

Question 19 Consider the array declared using the double prices[2][4] = { { 2.99, 14.99, 8.99, 24.99 }, { 1.99, 12.99, 6.99, 20.99 } }; statement. The statement prices[1][2] = prices[0][2]; will replace the number __________.

20.99 with 24.99

8.99 with 6.99

12.99 with 14.99

6.99 with 8.99

Question 20 __________ declares and initializes a four-element string array named sales; each element is initialized to 0.0.

string sales[4] = {0.0, 0.0, 0.0, 0.0};

string [4]sales = {0.0};

string sales[] = {0.0};

string sales[4] = {};

Question 21 In C++ you can use the __________ function to access any number of characters contained in a string variable.

access

substr

charAt

substring

Question 22 The __________ statement shows the prototype of a function that receives an array of double elements.

voiddisplayArray(double []);

voiddisplayArray(double);

voiddisplayArray(double *);

voiddisplayArray(double [*]);

Question 23 In C++, two-dimensional arrays are automatically passed __________ to functions.

by reference

by address

by value

by subscript

Question 24 Executing:

string name = "Rob Smith";

name.insert(4, "T. ");

changes the contents of the name variable to __________.

“Rob T. Smith”

“Rob T.Smith”

“RobT.Smith”

“RobT. Smith”

Question 25 The computer uses a file __________ to keep track of the next character either to read from or write to a file.

stream

iterator

pointer

object

Dot Image
expertguy Posted By :
Questions: 14328 Tutorials: 14188
Tutorials for this Question

saint com207 final exam latest 2017

Tutorial # 00577192
Posted On: 11/21/2017 10:35 AM
Feedback Score: 100% (by 1 users)
Purchased By: 3
expertguy
Posted By:
Questions:
14328
Tutorials:
14188
Report this Tutorial as Inappropriate
Tutorial Preview
The solution of saint com207 final exam latest 2017...
Attachments
saint_com207_final_exam_latest_2017.docx (128.82 KB)
Recent Feedback
Rated By Feedback Comments Rated On
Cooperative and generous tutors 04/01/2021

Great! We have found the solution of this question!

Related Questions
Saintleo COM207 Module 5 Hands-On Learning Latest 2018 JULY
COM207 Programming in C/C+ Module 5 Hands-On Learning Please complete the following: Chapter 9, Lab 9-2, pp. 307-314 Chapter 9, Computer Exercise 16, pp. 322-323 Chapter 10, Lab 10-2, pp. 347-355 …
saint com207 Module 6 Hands on learning latest 2017
Module 6 Hands on learning Please complete the following: Chapter 11, Lab 11-2, pp. 407-411 Chapter 11, Computer Exercise 20, p. 418 Chapter 12, Lab 12-2, pp. 446-449 Chapter 12, Comput …
saint com207 Module 7 Hands on learning latest 2017
Module 7 Hands on learning Please complete the following: Chapter 13, Lab 13-2, pp. 492-497 Chapter 13, Computer Exercise 20, p. 506 Chapter 13, Computer Exercise 21, p. 506 Chapter 13, Computer …
saint com207 final exam latest 2017
Module 8 final exam Question 1 You can use the built-in C++ __________ function to raise a number to a power and then return the result as a double number. xy() raise() pow() power() Question …
saint com207 full course latest 2017
Module 1 discussion An algorithm is classically defined as a finite series of steps which solves a problem. What are some types of instructions which occur in everyday life which would qualify as an …
Recent Questions
regis college nu641 exam
any exam questions …
Walden HLTH6412 Complete Course Latest 2025
HLTH6412-1/HLTH8412E-1/HLTH5412 Health Ed & Comm. Strategies Module 1 Discussion EVIDENCE BASED RESOURCES You have probably heard of evidence-based medicine, but have you heard of evidenc …
Walden HLTH6412 All Assignments Latest 2025
HLTH6412-1/HLTH8412E-1/HLTH5412 Health Ed & Comm. Strategies Module 1 Assignment DISTINGUISHING RELIABLE SOURCES OF INFORMATION Ensuring that you utilize reliable health information to in …
Walden HLTH6412 Module 6 Assignment Latest 2025
HLTH6412 Health Ed & Comm. Strategies Module 6 Assignment FINAL PROJECT Each day the public is exposed to many different forms of health communication. Health communications and the healt …
Walden HLTH6412 Module 5 Assignment 3 Latest 2025
HLTH6412-1/HLTH8412E-1/HLTH5412 Health Ed & Comm. Strategies Module 5 Assignment 3 INFOGRAPHIC FOR HEALTH EDUCATION TO E-LEARNING Keeping in mind the knowledge you gained from completing …
Walden HLTH6412 Module 5 Assignment 2 Latest 2025
HLTH6412-1/HLTH8412E-1/HLTH5412 Health Ed & Comm. Strategies Module 5 Assignment 2 INTRODUCTION TO DATA STORYTELLING WITH INFOGRAPHIC This assignment explores how much an infographic can …
Walden HLTH6412 Module 5 Assignment 1 Latest 2025
HLTH6412-1/HLTH8412E-1/HLTH5412 Health Ed & Comm. Strategies Module 5 Assignment 1 USING ARTIFICIAL INTELLIGENCE IN HEALTH EDUCATION It may be difficult to believe that the term Artificia …
Walden HLTH6412 Module 3 Assignment 2 Latest 2025
HLTH6412-1/HLTH8412E-1/HLTH5412 Health Ed & Comm. Strategies Module 3 Assignment 2 ASSESSING CULTURAL COMPETENCE Being a culturally competent health educator can help reduce the health eq …
Walden HLTH6412 Module 3 Assignment 1 Latest 2025
HLTH6412-1/HLTH8412E-1/HLTH5412 Health Ed & Comm. Strategies Module 3 Assignment 1 ASSESSING PERSONAL BIAS Bias is a result of our environment and background. We often make quick judgment …
Walden HLTH6412 Module 2 Assignment 2 Latest 2025
HLTH6412-1/HLTH8412E-1/HLTH5412 Health Ed & Comm. Strategies Module 2 Assignment 2 ASSESSING THE HEALTH LITERACY LEVEL OF HEALTH EDUCATION MATERIALS Carson, the community health educator …