Question: Consider the following C++ program: int main(){ string = Hello; s // (a) // (b) return 0; } a) Write a statement (hint: for
Consider the following C++ program: int main(){ string = "Hello"; s // (a) // (b) return 0; } a) Write a statement (hint: for loop) that prints the string s in reverse (i.e. will output olleH). b) Write a statement that prints the length of the string s (apply appropriate function).
Step by Step Solution
3.46 Rating (149 Votes )
There are 3 Steps involved in it
a To print the string s in reverse you can use a f... View full answer
Get step-by-step solutions from verified subject matter experts
