i'm trying to change array a inside set of typedef through function readset but it doesn't do anything to it and im trying to understand how to use a pointer so i would just send it to the function but its not working how to do that?
#include <stdlib.h>
#include <string.h>
typedef struct set {
char a[128];
}set;
set SETA={""};
void readset (set rset)
{
char tmp[128];
int i;
i=0;
while(i<128)
rset.a[i++]='0';
i=0;
while(i<128)
tmp[i++]='0';
tmp[arr[1]-1]='1';
strcpy(rset.a, tmp);
printf("tmp in function is: %s\n",tmp);
}
int main()
{
int i=0;
while(i<128)
SETA.a[i++]='0';
printf("\n");
printf("setA before: %s\n",SETA.a);
readset(setPtr);
printf("setA after: %s\n",SETA.a);
return 0;
} ```