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");
}
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 |
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"
write a c program to Reverse a given string using string function and also without string function
Write a program that find and print how many odd numbers in a binary tree
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }
Find your day from your DOB?
15 Answers Accenture, Microsoft,
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }