Write a c pgm for leap year

Answer Posted / sarayu

void main()
{
int yr;
printf("Enter the year");
scanf("%d",yr);
if(yr%4==0)
printf("given year is leap year");
else
printf("It is not a leap year");
getch();
}

Is This Answer Correct ?    50 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are the variables argc and argv are local to main?

780


Write a program to reverse a string.

631


What is the purpose of void pointer?

590


Can the “if” function be used in comparing strings?

583


Differentiate between new and malloc(), delete and free() ?

663






Explain what are reserved words?

630


What is the -> in c?

577


write a program to display all prime numbers

1450


What is variable initialization and why is it important?

611


What is the difference between exit() and _exit() function in c?

576


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

1400


What is difference between structure and union?

593


What is a newline escape sequence?

661


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5460


What does a pointer variable always consist of?

655