Write a simple C++ program in which you define two strings str1, str2. Check if both strings
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a simple C++ program in which you define two strings str1, str2.
- Check if both strings are empty.
- Assign values “Amjad Khan” & “ studying at University” to string str1 and str2 respectively.
- Check length of both strings.
- Print the character on index 2.
- Check if str1 is greater than str2 and vice versa.
- Append “ is” at the end of str1.
- Replace character ‘d’ with ‘q’.
- Append str1 with str2.
Related Book For
Posted Date: