#include<stdio.h> int main() { char j,i,a[15]=”hello”,b[15]=”world”,**p; while(a[i]!=”) { i++; } for(j=0;b[j]!=”;j++) { a[i+j]=b[j]; } printf(“%s”a) }
the approach is to stuff all the 24(3bit lcm of 3 and 8) bits into an integer variable, and then writing into the file from that int variable taking 1 byte at a time.** in 2 bit compression the 4 … Continue reading
RCS file: mdc.c,v Working file: mdc.c head: 1.11 branch: locks: strict root: 1.11 access list: symbolic names: keyword substitution: kv total revisions: 11; selected revisions: 11 description: This is the program for compression of file. —————————- revision 1.11 locked by: … Continue reading
Circular Queue Implementation completed successfully. RCS file: queue_cir.c,v Working file: queue_cir.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: Implemented the circular queue using arrays. Revision … Continue reading
#include<stdio.h> int main() { int value=77,num=99; int *pv=&value,*pn=# int **ppi; ppi=&pv; printf(“**ppi=%d\n”,**ppi); ppi=&pn; printf(“**ppi=%d\n”,**ppi); system(“pause”); } in this program we use two pointer as shown in program . In this first two value are stored in two variable after … Continue reading
#include<stdio.h> int main() { int a[100],b[100],c[100],i,n; printf(“enter element of array :”); scanf(“%d”,&n); printf(“Enter element of A:\n”); for(i=0;i<n;i++) { scanf(“%d”,&a[i]); } printf(“Enter element of A:\n”); for(i=0;i<n;i++) { scanf(“%d”,&b[i]); } for(i=0;i<n;i++) { c[i]=a[i]+b[i]; } for(i=0;i<n;i++) { printf(“a[%d] + b[%d]=c[%d]\n”,a[i],b[i],c[i]); } }
#include<stdio.h> int main() { int a[100],i,n; printf(“enter element of array :\t”); scanf(“%d”,&n); for(i=0;i<n;i++) { scanf(“%d”,&a[i]); } for(i=0;i<n;i++) { printf(“a[%d]=%d\n”,i,a[i]); } }
#include<stdio.h> int main() { int a[100],n,i; float Avg=0,sum=0; printf(“enter Numbre of array :\t”); scanf(“%d”,&n); printf(“Enter the element of array\n”); for(i=0;i<n;i++) { scanf(“%d”,&a[i]); sum=sum+a[i]; } Avg=sum/n; printf(“Avg = %f\n”,Avg); return 0; }
#include<stdio.h> int main() { int a[100],n,i,j; printf(“enter the value of array:”); scanf(“%d”,&n); printf(“enter the value :\n”); for(i=0;i<n;i++) { scanf(“%d”,&a[i]); } j=a[0]; for(i=1;i<n;i++) { if(j<a[i]) j=a[i]; else j=j; } printf(“Largest element of array is :%d\n”,j); }
#include<stdio.h> 2 main() 3 { 4 int i,j,k,l,m,A,v; 5 printf(“\nsize”); 6 scanf(“%d”,&k); 7 char x; 8 9 int a[k]; 10 11 for(i=0;i<k;i++) 12 { 13 scanf(“%d”,&a[i]); 14 } 15 16 while(1){ 17 getchar(); 18 printf(“\npress i to insetre tyhe array”); … Continue reading
—in this program i’ve used the pipe for communication between server and three client.while single pipe for commmunication between processes and server. for synchronisation i’ve used signal handler.signal(SIGUSR1,ouch). —–program for server—— RCS file: ./server.c,v Working file: ./server.c head: 1.5 branch: … Continue reading
RCS file: decompression.c,v Working file: decompression.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: 4 bit decompression —————————- revision 1.1 locked by: root; date: 2014/06/15 17:24:08; author: … Continue reading
RCS file: nitasha.c,v Working file: nitasha.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: 4 bit compression —————————- revision 1.1 locked by: root; date: 2014/06/15 15:18:02; author: … Continue reading
RCS file: sread.c,v Working file: sread.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 reading function to read the data from the kernel space. … Continue reading