
ADTs, Data Structures, and Problem Solving with C++ 2nd Edition by Larry Nyhoff
Edition 2ISBN: 978-0131409095
ADTs, Data Structures, and Problem Solving with C++ 2nd Edition by Larry Nyhoff
Edition 2ISBN: 978-0131409095 Exercise 6
Exercises 1-6 assume ASCII representation of characters and the following function f():
? void f(char ch) { if (('A' = ch) (ch = 'H')) { f(ch ? 1); cout ch; } else cout endl; }
Tell what output will be produced by the function call.
f ('C') if a copy of the output statement is inserted before the recursive call to f()
? void f(char ch) { if (('A' = ch) (ch = 'H')) { f(ch ? 1); cout ch; } else cout endl; }
Tell what output will be produced by the function call.
f ('C') if a copy of the output statement is inserted before the recursive call to f()
Explanation
Analyzing the given program:
The functi...
ADTs, Data Structures, and Problem Solving with C++ 2nd Edition by Larry Nyhoff
Why don’t you like this exercise?
Other Minimum 8 character and maximum 255 character
Character 255