![]() |
VOOZH | about |
A leap year is a year that contains an additional day in February month i.e. February 29. It means that a leap year has 366 days instead of the usual 365 days. In this article, we will see the program to check for leap year in C.
A leap year occurs once every four years and to check whether a year is a leap year, the following conditions should be satisfied:
- It is a multiple of 4 but not of 100, or
- It is a multiple of 400.
For example, 2000 is a leap year but 1900 is not.
Leap Year
- Time Complexity: O(1)
- Auxiliary Space: O(1)