igure I below shows the screen output of Program I. Complete the program to generate the output as shown in Figure I. lote: You cannot create new variables and cannot use the overloaded operator for concatenation. ou are only allowed to use the functions to complete the program below. Output: SC student attends programming technique 2 Reversed: 2 euqinhcet gnimmargorp sdnetta tneduts CS Output vs. Reversed (compare): 1 Output vs. Reversed (length): 42 vs. 42 *Note: All the stated string variables are empty Figure 1: Screen output of Program 1 / Program 1 include sinclude sinclude using namespace std; int main(){ string name("SC STUDENT"); string word1="pro"; string word2="gram"; string word3="technique"; word1.append(word2); word1.append ("ming"); word1.insert(0, word1.append(word3); word1.insert(20, " "); attends "); word1. (30, 2"); // attends programming technique 2 word2.clear(); word3.clear(); word2.assign(name.substr(3,7)); string::iterator it; for(it=word2.begin(); it!=word2.end(); it++){ word3+=:: • (*it); // conversion of letter } (3,7, word3); name. name.append (word1); cout<<"Output: "<
igure I below shows the screen output of Program I. Complete the program to generate the output as shown in Figure I. lote: You cannot create new variables and cannot use the overloaded operator for concatenation. ou are only allowed to use the functions to complete the program below. Output: SC student attends programming technique 2 Reversed: 2 euqinhcet gnimmargorp sdnetta tneduts CS Output vs. Reversed (compare): 1 Output vs. Reversed (length): 42 vs. 42 *Note: All the stated string variables are empty Figure 1: Screen output of Program 1 / Program 1 include sinclude sinclude using namespace std; int main(){ string name("SC STUDENT"); string word1="pro"; string word2="gram"; string word3="technique"; word1.append(word2); word1.append ("ming"); word1.insert(0, word1.append(word3); word1.insert(20, " "); attends "); word1. (30, 2"); // attends programming technique 2 word2.clear(); word3.clear(); word2.assign(name.substr(3,7)); string::iterator it; for(it=word2.begin(); it!=word2.end(); it++){ word3+=:: • (*it); // conversion of letter } (3,7, word3); name. name.append (word1); cout<<"Output: "<
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY