This assignment is equivalent to the assignment to compare two character arrays or two strings ignoring embedded space characters. As instead of the space character any other character can be considered then having such a function (or algorithm) you can do the original assignment by comparing a date with it itself but in reverse order.
It is not difficult to write such function. I already did that.

Popular White Paper On This Topic

This assignment is equivalent to the assignment to compare two character arrays or two strings ignoring embedded space characters. As instead of the space character any other character can be considered then having such a function (or algorithm) you can do the original assignment by comparing a date with it itself but in reverse order.
It is not difficult to write such function. I already did that.

Sorry. I thought that it is required to determine whether a given date is a palindrome.

Thu, 31 May 2012 06:36:04 -0400 ?? "manik019" email@removed:
Reply from manik019?on May 31 at 6:37 AM
The function is to find the immediate next palindrome date.
How can you compare it with string palindromes. You have to find the "immediate next palindrome".

I wrote this small program.
Although, it needs a lot of improvements, there are some minor flaws(leap year etc) in this code which still remain still I was quite busy lately but I am just sharing my idea.

IDEA: Get the year from the date inputted by user. Go to next year and form a date from the year. Check whether this date is a valid date. [The date formed in the below code is always a palindrome date beginning from the year given by user. I am just checking if it is a valid date].

ALGORITHM:

1. Extract year(y1y2y3y4) from the date entered by user.
2. Increment year by 1.
3. Extract y1y2 from year(y1y2y3y4) - [Divide by 100] and store it as day.
4. Transpose the day.
5. Extract y3y4 from year(y1y2y3y4) and store it as month.
6. Transpose day and month.
7. Check whether it is a valid date. If yes then print else goto 2.

The function "rev" reverses the integer passed, returning an integer; for
example, for 21 returns 12. It is made converting integer to an array of
char, reversing and
converting the reversed string to integer.
The funcion "max_day" determines which is the maximum day of each month for
the year. This function can be implemented by the algorithm in Kernighan
and Rictchie book.
Both functions are straightforward and are not listed for clarity
The result follows

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.