How do I save letter by letter of the new word in a matrix?
#include<stdio.h>
int main()
{
int i=0,j,arr[26]={},temp;
char s[10],arr1[10],*p;
printf("Enter the string\n");
scanf("%s",s);
p=s;
while(*p!='#include<stdio.h>
int main()
{
int i=0,j,arr[26]={},temp;
char s[10],arr1[10],*p;
printf("Enter the string\n");
scanf("%s",s);
p=s;
while(*p!='%pre%')
{
temp=((*p)>92)?(*p)-'a':(*p)-'A';
if(arr[temp]==0)
{
arr1[i]=temp+'a';
arr[temp]=1;
i++;
}
p++;
}
for(j=0;j<i;j++)
{
printf("%c",arr1[j]);
}
return 0;
}
')
{
temp=((*p)>92)?(*p)-'a':(*p)-'A';
if(arr[temp]==0)
{
arr1[i]=temp+'a';
arr[temp]=1;
i++;
}
p++;
}
for(j=0;j<i;j++)
{
printf("%c",arr1[j]);
}
return 0;
}