Leap Year Program in C Last Updated : 14 Jul, 2023 Comments Improve Suggest changes Like Article Like Report 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. Conditions for a Leap Year 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, orIt is a multiple of 400. For example, 2000 is a leap year but 1900 is not. Algorithm to Check Leap Year in CIF year % 400 = 0 PRINT "Leap Year" ELSE IF year % 100 = 0 PRINT "Not a Leap Year" ELSE IF year % 4 = 0 PRINT "Leap Year" END IF PRINT "Not a Leap Year"Leap Year Program in C C // C program to check if a given // year is leap year or not #include <stdbool.h> #include <stdio.h> bool checkYear(int year) { // If a year is multiple of 400, // then it is a leap year if (year % 400 == 0) return true; // Else If a year is multiple of 100, // then it is not a leap year else if (year % 100 == 0) return false; // Else If a year is multiple of 4, // then it is a leap year else if (year % 4 == 0) return true; // if no above condition is satisfied, then it is not // a leap year return false; } // Driver code int main() { int year = 2000; if (checkYear(year)) { printf("Leap Year"); } else { printf("Not a Leap Year"); } return 0; } OutputLeap YearComplexity AnalysisTime Complexity: O(1)Auxiliary Space: O(1) Comment More infoAdvertise with us Next Article Leap Year Program in C K kartik Follow Improve Article Tags : C Programs C Language C Basic Programs Similar Reads Your First C Program Like in most of the programming languages, program to write the text "Hello, World!" is treated as the first program to learn in C. This step-by-step guide shows you how to create and run your first C program.Table of ContentSetting Up Your EnvironmentCreating a Source Code FileNavigating to the Sou 4 min read Parallel Programming in C Parallel programming is a technique that allows multiple computations to be performed simultaneously, taking advantage of multi-core processors and distributed computing systems. Parallel programming can improve the system's performance by dividing the bigger task into smaller chunks and executing t 5 min read C File Handling Programs C Program to list all files and sub-directories in a directory C Program to count number of lines in a file C Program to print contents of file C Program to copy contents of one file to another file C Program to merge contents of two files into a third file C program to delete a file 1 min read C Hello World Program The âHello Worldâ program is the first step towards learning any programming language. It is also one of the simplest programs that is used to introduce aspiring programmers to the programming language. It typically outputs the text "Hello, World!" to the console screen.C Program to Print "Hello Wor 1 min read Misc C Programs C Program to print environment variablesC Program to Swap two NumbersC program swap two numbers without using a temporary variableC Program to check if a given year is leap yearC Program to sum the digits of a given number in single statement?C program to print numbers from 1 to 100 without using lo 1 min read Like