RCS file: special.c,v Working file: special.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: —————————- revision 1.1 locked by: root; date: 2015/02/21 07:40:24; author: root; state: Exp; … Continue reading
1 #include <stdio.h> 2 int main() 3 { 4 int i=0; 5 int j=1; 6 printf(“%d”, i); 7 printf(” %d”,j); 8 int k,a,sum; 9 for (k=0;k<=10;k++) 10 { 11 sum=i+j; 12 a=sum; 13 i=j; 14 j=a; 15 printf(” %d”,sum); 16 … Continue reading
1 head 2.1; 2 access; 3 symbols; 4 locks 5 emblogic:1.1; strict; 6 comment @ * @; 7 8 9 1.1 10 date 2015.02.21.05.39.49; author emblogic; state Exp; 11 branches; 12 next ; 13 14 15 desc 16 @This programme … Continue reading
RCS file: q2.c,v Working file: q2.c head: 1.4 branch: locks: strict root: 1.4 access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: in this i have created input() to enter two distance in feet and … Continue reading
RCS file: q2.c,v Working file: q2.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: implementation of nested structure in this we have converted feet-inches into metres nd … Continue reading
RCS file: q2.c,v Working file: q2.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: implementation of nested structure in this we have converted feet-inches into metres nd … Continue reading
#include<stdio.h> int main() { int a,b,c,d,e,largest,smallest; printf(“enter five integers\n”); scanf(“%d%d%d%d%d”, &a,&b,&c,&d,&e); largest = a; if (b > largest) { largest=b; } if (c > largest) { largest=c; } if (d > largest) { largest=d; } if (e > largest) { … Continue reading
RCS file: merge.c,v Working file: merge.c head: 1.2 branch: locks: strict prachisinghal: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: merge two arrays using pointer. —————————- revision 1.2 locked by: prachisinghal; date: 2015/02/13 … Continue reading
1 #include <stdio.h> 2 int main() 3 { 4 int a,b,c, pay1, pay2, pay; 5 printf(“enter daily working hours\n”); 6 scanf(“%d”, &a); 7 b= a * 6; 8 printf(“weakly hours are %d\n”, b); 9 if (b > 40) … Continue reading
1 #include <stdio.h> 2 int main() 3 { 4 int side, base, height,choice,AOT,AOS; 5 printf(“enter side\n”); 6 scanf(“%d”, &side); 7 printf(“enter base\n”); 8 scanf(“%d”, &base); 9 printf(“enter height\n”); 10 scanf(“%d”, &height); 11 printf(“1=AOT\n”); 12 printf(“2=AOS\n”); 13 scanf(“%d”,&choice); 14 switch(choice) 15 … Continue reading
RCS file: q1_functions.c,v Working file: q1_functions.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: implementations of structures by using functions —————————- revision 1.1 locked by: root; date: … Continue reading
1 #include <stdio.h> 2 int main() 3 { 4 long int a=0; 5 long int n; 6 printf(“enter a number\n”); 7 scanf(“%ld”, &n); 8 while(n!=0) 9 { 10 a=a*10; 11 a=a+(n%10); 12 n=n/10; 13 } 14 printf(“%ld”,a); 15 return 0; … Continue reading
1 #include <stdio.h> 2 int main() 3 { 4 int a; 5 printf(“enter a number\n”); 6 scanf(“%d”, &a); 7 if(a > 0) 8 { 9 printf(“it is positive\n”); 10 } 11 else if(a < 0) 12 { 13 printf(“it is … Continue reading
1 #include<stdio.h> 2 int main() 3 { 4 float feet, inch,feet1,feet2,inch1,inch2; 5 printf(“enter 1st distance in feet\n”); 6 scanf(“%f”, &feet1); 7 printf(“enter 1st distance in inches\n”); 8 scanf(“%f”, &inch1); 9 printf(“enter 2nd distance in feet\n”); 10 scanf(“%f”, &feet2); 11 printf(“enter … Continue reading
#include <stdio.h> int main() { int year; printf(“enter year\n”); scanf(“%d”, &year); if(year % 4==0 || year % 100== 0) printf(“it is leap year\n”); else printf(“it is non leap year\n”); return 0; }