Discover
Questions library
Collections library
Find online teacher
login
Discover
questions library
Find online teacher
login
C++ Primer
by
Stanley B.Lippman, Josee Lajoie, Barbara E.Moo
Edition:
5th Edition
ISBN13:
978-0-321-71411-4
ISBN10:
0 -321-71411-3
591
C++ programming
Home
Books
C++ Primer
Similar Books
No books found
Title
Chapter: 3 /
Q: 3.13
How many elements are there in each of the following vectors? What are the values of the elements?
Chapter: 3 /
Q: 3.14
Write a program to read a sequence of ints from cin and store those values in a vector
Chapter: 3 /
Q: 3.15
Repeat the previous program but read strings this time
Chapter: 3 /
Q: 3.16
Write a program to print the size and contents of the vectors from exercise 3.13. Check whether your answers to that exercise were correct. If not, restudy § 3.3.1 (p. 97) until you understand why you were wrong
Chapter: 3 /
Q: 3.17
Read a sequence of words from cin and store the values a vector. After you’ve read all the words, process the vector and change each word to uppercase. Print the transformed elements, eight words to a line
Chapter: 3 /
Q: 3.18
Is the following program legal? If not, how might you fix it?
Chapter: 3 /
Q: 3.19
List three ways to define a vector and give it ten elements, each with the value 42. Indicate whether there is a preferred way to do so and why
Chapter: 3 /
Q: 3.20
Read a set of integers into a vector. Print the sum of each pair of adjacent elements. Change your program so that it prints the sum of the first and last elements, followed by the sum of the second and second-tolast, and so on
Chapter: 3 /
Q: 3.21
Redo the first exercise from § 3.3.3 (p. 105) using iterators
Chapter: 3 /
Q: 3.22
Revise the loop that printed the first paragraph in text to instead change the elements in text that correspond to the first paragraph to all uppercase. After you’ve updated text, print its contents
total questions:
591
Previous
15
16
17
18
19
Next
Questions
591
Views
Best Answers
299
Points
5
×
Close
add reason
reason