#include <string.h>
#include <unistd.h>
#include <stdio.h>
int main()
{
char a[6] = "abcdd";
char b[5] = "1234";
strcpy(a, b);
write(1, a, 4);
printf("AA\n");
write(1, b, 4);
printf("CC\n");
}
I was studying strcpy func.
With ./a.out
1234AA
1234CC
With ./a.out | cat -e
12341234AA$
CC$
I read man cat. Can't find any with this.
What changes can be made even after compile?
What happened? What are the concept I am missing?