Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started