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

main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?

2 Answers  


write a program for area of circumference of shapes

0 Answers  


plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............

2 Answers   Wipro,


main() { int i=5; printf("%d",++i++); }

1 Answers  


#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }

1 Answers  






How we print the table of 3 using for loop in c programing?

7 Answers  


main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }

1 Answers  


Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 Answers  


code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123

1 Answers   HCL,


Is the following code legal? struct a { int x; struct a *b; }

2 Answers  


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

6 Answers   Fusion Systems GmbH,


void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }

1 Answers   Honeywell,


Categories