Write a c pgm for leap year
Answer Posted / azad sable,chiplun.
void main()
{
int yr;
clrscr();
printf("enter the year");
scanf("%d",&yr);
if(yr%100==0)
{
if(yr%400==0)
printf("\nLeap year");
else
printf(\nNot aleap year");
}
else
{
if(yr%4==0)
printf(\nLeap yaer");
else
printf("\nNot a leap year");
}
getch();
}
| Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
Explain Function Pointer?
Explain #pragma statements.
Why is void main used?
What is function pointer c?
When should a far pointer be used?
How do we print only part of a string in c?
How can you access memory located at a certain address?
What are extern variables in c?
How would you obtain the current time and difference between two times?
program for reversing a selected line word by word when multiple lines are given without using strrev
What does printf does?
What are formal parameters?
Is c a great language, or what?