#include<stdio.h> int main() { int i,j; printf(“Enter the value of i:”); scanf(“%d”,&i); printf(“Enter the value of j:”); scanf(“%d”,&j); i=i+j; j=i-j; i=i-j; printf(“%d”,i); printf(“%d”,j); return 0; }
#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: 04.c,v Working file: 04.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: This is the base file for our program…. —————————- revision 1.2 locked by: … Continue reading
#include #include int main() { int b; int i=0,j=0,k=0; char *a[10],c,*temp; printf(“How many string you want to enter:”); scanf(“%d”,&b); for(i=0;i<b;i++) { a[i]=(char*)malloc(sizeof(char)*20); } printf("Enter %d strings\n",b); for(i=0;i<b;i++) { scanf("%s",a[i]); } //Algorithm to sort string for(k=0;k<b;k++) { for(i=0;i(*(*(a+i+1)+j))) { temp=*(a+i); *(a+i)=*(a+i+1); … Continue reading
RCS file: area.c,v Working file: area.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 06:35:32; author: root; state: Exp; … Continue reading
RCS file: largest.c,v Working file: largest.c head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: this is abt —————————- revision 1.2 locked by: root; date: 2015/02/20 08:50:26; author: … Continue reading
#include<stdio.h> int main() { char i; printf(“Enter the value of i”); scanf(“%c”,&i); switch(i) { case ’0′: printf(“Black”); break; case ’1′: printf(“brown”); break; case ’2′: printf(“Red”); break; case ’3′: printf(“Orange”); break; case ’4′: printf(“Yellow”); break; case ’5′: printf(“Green”); break; case ’6′: … Continue reading
1. Create a Queue. 2. In write function if(rp is less than fp) { write; increment rp; if(rp==fp) printf(“queue full”); } 3.In read function if(rp is greater than fp) { read; increment fp; if(rp == fp) printf(“queue empty”); }
RCS file: lgen.c,v Working file: lgen.c head: 1.27 branch: locks: strict root: 1.27 access list: symbolic names: keyword substitution: kv total revisions: 27; selected revisions: 27 description: A generalised program of linked list —————————- revision 1.27 locked by: root; date: … Continue reading
RCS file: 1.c,v Working file: 1.c head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: STRUCTURE ASSIGNMENT —————————- revision 1.2 date: 2014/09/27 00:30:59; author: root; state: Exp; lines: +1 -1 … Continue reading
RCS file: 1.c,v Working file: 1.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: understand the basic pointer concepts understand that pointer stores a logical address in … Continue reading
RCS file: 1.c,v Working file: 1.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: understand array concept by getting input in array and displaying on terminal —————————- … Continue reading
RCS file: 1.c,v Working file: 1.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: do practice of while,for loop —————————- revision 1.1 locked by: root; date: 2014/10/29 … Continue reading
RCS file: 1.c,v Working file: 1.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: understand the concept behind if(y0)x=3; else x=5; and if(z=(y==0))x=5; and if(x=y=z)x=3; this is … Continue reading
RCS file: 1.c,v Working file: 1.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: use of if-else statement to determine a number wheather it is postive or … Continue reading