Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 5th, 2011, 04:37 AM
Registered User
 
Join Date: Oct 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default The most recent word

Write a function that will find and return most recent word in the given text.
The prototype of the function have to be the following void mostRecent(char *text,char *word)
In char *word your function have to return the most recent word that occurce in the text.
Your program have to be not case-sensitive(ignore case - "Can" and "CAN" are the same words)
Also note than WORD is sequence of letters sepereated by whitespace.
Note. The program have to use pointer.
Input:
First line contains one line that is not longer than 1000 symbols with whitespaces.

Output: The most recent word in UPPER case.

Samples:

№ INPUT OUTPUT
1 Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo BUFFALO
2 Can you can the can with can? CAN
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Most Recent Date Ludgero SQL Server ASP 1 August 29th, 2006 12:48 PM
How to get the most recent value from a column method Access 0 July 3rd, 2005 03:32 PM
Most recent list bmains Forum and Wrox.com Feedback 3 June 29th, 2004 07:38 AM
Most recent ID Colonel Angus SQL Server 2000 6 March 31st, 2004 09:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.