Question 5 How many times will the following function call itself if 5 is passed as the argument? void showMessage (int n) [ if (n > 0) { 01 } 04 cout << "hello\n": showMessage (n + 1); started, open (535) Canvas How To and Technical Support link, and scroll down to t O An infinite number of times
0 Question 6 Fill in the code to complete the following function for checking whether a string is a palindrome: bool isPalindrome (const string& s) ( if (s.size() <= 1) return true; else if return false; return isPalindrome (s.substr(1, s.size()-2)); else (s[0]=sls.size()-1]) O O (s[0] 1-s[s.size()-1]) O (s[0] s[s.size() - 11) O (s[0]s[s.size()-1]) 1 pts
ke a Quiz or Exam? page. ke a Quiz or Exam? page. Question 5 How many times will the following function call itself if 5 is passed as the argumen
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am