PROG+PROB. SOLV W/C++, ENH (SPEC VAL)
PROG+PROB. SOLV W/C++, ENH (SPEC VAL)
6th Edition
ISBN: 9781284564266
Author: Dale
Publisher: Jones & Barlett
bartleby

Videos

Question
Book Icon
Chapter 3, Problem 5PP
Program Plan Intro

Program Plan:

To create a new string from the given string in the uppercase.

Program Description:

Starting with the main method, the following steps are taken to make the required string −

  • Two strings − oldtsr and newstr are declared to store the old and the new strings respectively.
  • A string oldstr is initialized with the string.
  • An array of typeinteger a is declared and initialized with the indices of the required string.
  • A for loop is used to work with the array.
  • In the loop, the indices stored in an array are used to print the characters in uppercase using toupper function and store them in the new string newstr.
  • Finally, a string newstr is displayed.

Blurred answer
Students have asked these similar questions
show work
show work on paper
show work on paper
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Algebraic Expressions – Algebra Basics; Author: TabletClass Math;https://www.youtube.com/watch?v=U-7nq7OG18s;License: Standard YouTube License, CC-BY
Python Tutorial for Beginners 3 - Basic Math, Mathematical Operators and Python Expressions; Author: ProgrammingKnowledge;https://www.youtube.com/watch?v=Os4gZUI1ZlM;License: Standard Youtube License