Write a c pgm for leap year
Answer Posted / rukmanee
#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr();
printf("\n enter a year:");
scanf("%d",&year);
if(year%2==0&&year%100==0&&year%400==0)
{
printf("the given year is a leap year");
}
else
{
printf("the given year is not a leap year :");
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
Can the size of an array be declared at runtime?
Explain what is operator promotion?
What is meant by inheritance?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
What does & mean in scanf?
Explain what is #line used for?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Difference between MAC vs. IP Addressing
What is action and transformation in spark?
Explain how can I open a file so that other programs can update it at the same time?
What is the ANSI C Standard?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
How can I convert a number to a string?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor