Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

reparation Exercises 1, 2, 8, 9, 19. nming Warm-Up Exercises 5, 8. Exam Preparation Exercises 1. Mark the following identifiers as either valid or invalid.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

reparation Exercises 1, 2, 8, 9, 19. nming Warm-Up Exercises 5, 8. Exam Preparation Exercises 1. Mark the following identifiers as either valid or invalid. Valid Invalid a. theDog b. all-In-One c. const d. recycling e. DVD_ROM f. elizabeth_the_2nd g. 2morrow h. page# 2. Match the following terms with the definitions given below. a. Function b. Syntax c. Semantics d. Metalanguage e. Identifier f. Data type g. Variable h. Named constant i. Literal j. Expression i. An identifier referring to a value that can be changed. ii. A specific set of values, along with operations that can be applied to those val- ues. iii. A value that appears in a program. iv. The set of rules that determines the meaning of instructions written in a pro- gramming language. v. A language that is used to write the rules for another language. vi. A subprogram in C++. vii. A name that is used to refer to a function or data object. viii. An arrangement of identifiers, literals, and operators that can be evaluated. 8. What is output by the following statement? cout Stroustrup!"; const string TITLE = "Dr."; cout return 0; using namespace std; Programming Warm-Up Exercises 1. Write an output statement that prints today's date and then goes to the next line. 2. Write a single output statement that outputs the following three lines: He said, "How is that possible?" She replied, "Using manipulators." "Of course!" he exclaimed. 3. Write declarations for the following: a. A named constant, called ANSWER, of type string, with the value "True" b. A char variable with the name middleInitial c. A string variable with the name course Title d. A named char constant, called PERCENT, with the value '%' 4. Change the three declarations in the PrintName program on page 67 so that it prints your name. 5. Given the following declarations: const string PART1 = "Pro"; const string PART2 = "gramming and "; const string PART3 = "blem Solving with C++"; Write an output statement that prints the title of this book, using only the cout stream, the stream insertion operator, and the above-named constants. 8. Problem: Find the 10 missing items in the following program #include const string A = "A"; const string B "B"; const char C 'C'; int main string forward string backward; forward = A + " " + B + " " + C; cout "Forward order: " forward

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions