To find out the current year is leap year or not which
date() function we've to use.Give the syntax also

Answer Posted / krishna reddy ketha

NOTE:
IT IS ONLY FOR FIND OUT THE GIVEN YEAR IS
LEAP YEAR OR NOT.

CONDITION:
/*
leap year:

// is divisible by 4 and not by 100
// is divisible by 400
*/


if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)

printf("%d is a LEAP YEAR" + year);
else
printf("%d is NOT a LEAP YEAR" + year);

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the ways to define a constant in php?

523


What are the __construct() and __destruct() methods in a php class?

507


How to remove duplicate values from a PHP Array?

541


Which php global variable is used for uploading a file?

504


What is a string in php?

549






What is active record in php?

474


How to find length of an array in php ?

554


Is empty in excel?

527


How can you create a session in php?

525


How can you submit a form without a submit button?

527


Explain the difference between $var and $$var?

528


Does https prevent csrf?

511


What is php in full?

498


what is the current salary package in India for a PHP programmer who has 1.5 years experience

2483


How to open a file for writing?

560