C Practice Test(Chitkara University) Get link Facebook X Pinterest Email Other Apps Practice Test 1 Link Click here to download Practice Test 2 Link Click here to download Get link Facebook X Pinterest Email Other Apps Comments
Code for array display Code for array display #include<stdio.h> #include<conio.h> void main() { int i,a[5]; printf("Enter 3 elements"); for(i=0;i<3;i++) { scanf("%d",&a[i]); } printf("Array is "); for(i=0;i<3;i++) { printf("%d",a[i]); } getch(); } Output Read more
Code for febonacci series Code for febonacci series #include<stdio.h> #include<conio.h> void main() { int i,a=0,b=1,f; printf("%d%d",a,b); for(i=1;i<=8;i++) { f=a+b; a=b; b=f; printf("%d",f); } getch(); } Output Read more
Code to check leap year Code to check leap year #include<stdio.h> #include<conio.h> void main() { int a; printf("Enter year"); scanf("%d",&a); if(a%4==0) { printf("It is a leap year"); } else { printf("It is not a leap year"); } getch(); } OUTPUT Read more
Comments
Post a Comment