C++ Object Oriented Programming Chapter 5 String


Given an incomplete program which utilize  C++ string object as follows.Complete the program by filling in the blanks according to the instructions stated in the comments.Note:You are not allowed to use C-string Library to answer this question.


Write a program that has an array at least 10 string objects which hold students name,matric numbers.
Make your own string,or use the following string for an array.


Write a program that asks the user to enter a book details with an author's name ,year published and book title.The author's name takes a string containing a fullname in the form of firstname and lastname seperated from each other by a single space.The program should then arrange the input in the following manner.
a. Fullname-The lastname followed by a comma,followed by a firstname and then followed by a space.
b. Year of publication-Insert an open bracket "("n followed by year published and then followed by a closed bracket ")".
c. Book's Title - Insert a space and followed by year published.

How to calculate how many word in string?

Post a Comment

0 Comments