Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hi i need help with these questions for C++ 1. Given as follows. Can you create a code snippet that resets 'str' value with the

hi i need help with these questions for C++

1. Given as follows. Can you create a code snippet that resets 'str' value with the letters in reversed order, namely "yppah"? Please use a loop and array notation to fulfill the requirement.

string str = "happy";

2. Please design a user-defined function that takes an integer (0-127) as a parameter. The function returns the corresponding character of the integer.

3. Create a user-defined function that takes two integer parameters, using pass-by-reference. The function will compare the two numbers and set the larger number variable with the value of the smaller number, and the smaller number variable with the difference of the original two numbers.

For example:

n1=10, n2=6;

After the function call, n1=6, n2 = 4;

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

Step: 3

blur-text-image

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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

understand the key issues concerning international assignments

Answered: 1 week ago