Here is a short program that generates a file in the current working directory named "backspace.txt" that contains text with backspaces in it.
Note that backspace is sometimes displayed as '^H' (control-h). In a hex dump, a backspace is a byte with a value of 0x08.
FILE *fp = fopen("backspace.txt", "w");
if (fp == NULL)
perror("unable to create file backspace.txt");
fprintf(fp, "This text contains b\ba\bc\bk\bs\bp\ba\bc\be\bs\n");