main()

{

int y;

scanf("%d",&y); // input given is 2000

if( (y%4==0 && y%100 != 0) || y%100 == 0 )

printf("%d is a leap year");

else

printf("%d is not a leap year");

}



main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 &am..

Answer / susie

Answer :

2000 is a leap year

Explanation:

An ordinary program to check if leap year or not.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More C Code Interview Questions

void main() { unsigned giveit=-1; int gotit; printf("%u ",++giveit); printf("%u \n",gotit=--giveit); }

1 Answers  


what is brs test reply me email me kashifabbas514@gmail.com

0 Answers  


In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.

0 Answers   TCS,


Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number

2 Answers   Ace Info,


main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16

4 Answers   HCL,






write a c program to Create a registration form application by taking the details like username, address, phone number, email along with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 5 users and display the details. In place of password display “****”. (Use Structures).

0 Answers   CDAC, College School Exams Tests,


program to find the roots of a quadratic equation

14 Answers   College School Exams Tests, Engineering, HP, IIIT, Infosys, Rajiv Gandhi University of Knowledge Technologies RGUKT, SSC,


Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??

0 Answers   Home,


program to Reverse a linked list

12 Answers   Aricent, Microsoft, Ness Technologies,


How to read a directory in a C program?

4 Answers  


main() { extern int i; i=20; printf("%d",sizeof(i)); }

2 Answers  


What is your nationality?

1 Answers   GoDB Tech,


Categories