Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This program should be written on C++, guidelines are uploaded. Warm up exercises-we will discuss the following Pointers . Pointer declaration -Use Arithmetic Double pointers
This program should be written on C++, guidelines are uploaded.
Warm up exercises-we will discuss the following Pointers . Pointer declaration -Use Arithmetic Double pointers (BK) Arrays of pointers (BK) Bubble sort (BK) Pass string to function and change case. ?ftime String examples . . strien, stropy, Lab 8 (this is to be turned in) Palindrome is a string that is the same as backwards or forwards "otto" "ababa "noon" "ababbbbaba In this lab we will work with strings (so we will be using character arrays). 1. Write a program that reads two strings str1 and str2 from the keyboard 2. Print both strings 3. Write a function computeLength and call this function in main to compute the length of the string str1 and str2. 4. if the string strl is of length 1 the program will terminate if the string str2 is of length 0 the program will terminate 5. Next A prefix of a string is a nonempty string that is an initial segment Example "moondog" has prefixes of "moo", "m". "moon", "mo", "moond".... Write a function isPrefix (str1, str2) that returns 1 if the string str2 is a prefix of stri substring of str1 then isPrefix should return a ONE, if not return a ZERO See class discussion for the definition 6. 7. Call this function with strl and str2 in main and output your result 8. Now write a function isPalindrome(str) that returns a 1 if str is a palindrome and 0 otherwise. To get full credit use isPrefix in your function 9. Call your function isPalindrome(str1) 10. Output the correct conclusion either PALINDROME or NOT PALINDROME F3 FS F6 F7 F8 F9 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