string a = “My name is Fred. Is your name Fred?”;
string b = “I like fish and fries. Farewell.”;
int countF = 0;
Write a few lines of code (need not be a separate function) to:
(a) Concatenate strings a and b separated by a space into a string f. Print it.
(b) Assign countF the number of times that the uppercase F appears in string f. Print the value of countF.
(c) Print “Fred’s found” if string f contains the letters Fred.
Recently Asked Questions
- I have tried and tried these problems and have gotten no where near the answer :/ Please help!
- I am writing psuedocode for a program that lets the user enter the total rainfall for each of 12 months into an array. The program should calculate and display
- 1. If you were to going to be a Religious Studies major, what religious studies approach/method (i.e., anthropological, sociological, textual,