EmbLogic's Blog

multiple data compression

@#include
32 #include
33 #include
34 #include
35 int main()
36 {
37 char arr[55],m[55],ch1,ch2;
38 int fd,j,ret,i=0,len;
39 fd =open(“text”,O_RDONLY);
40 read(fd,&arr,55);
41 len=strlen(arr);
42 printf(“lenght of string is %d\n”,len);
43 if(fd<0)
44 {
45 perror("read");
46 exit(-1);
47
48 }
49 for(i=0;i<len;i++)
50 {
51 printf("%c\n",arr[i]);
52 }
53 printf("the master array is=");
54 int size;
55 size=1;
56 for(i=0;i<len;i++)
57 {

for(j=0;j<=size;j++)
59 {
60 if((j+1)==size)
61 {
62 m[j]=arr[i];
63 size=size++;
64 break;
65 }
66 else
67 {
68 if(m[j]==arr[i])
69 {
70 break;
71 }
72 }}
73 }
74
75 for(j=0;j<=size;j++)
76 {
77 printf("%c\n",m[j]);
78 }
79 return 0;
80 }
81
82 @
83
84
85 1.1
86 log
87 @Initial revision
88 @
89 text
90 @d7 2

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>