I delete spaces, tabs, transitions to a new line in a text file (the text file itself is a program)
char sep [10]="\n"; char *istr; istr = strtok (A+107,sep); while (istr != NULL) { printf ("%s",istr); istr = strtok (NULL,sep); } I deviate 107 characters from the beginning of the line in order not to touch the declared libraries. But in the end, spaces cannot be removed in the same way. It turns out something like this:
void vpqumlntyof(char *A ,char *O4gh){ int i = 0; int R0x1 = strlen(A); int Pd0x = strlen(O4gh); if (R0x1 == Pd0x) { while (i < strlen(A)) { if (A[i] == O4gh[i]) { i++; } else break; } if (i == strlen(A)) { puts("Correct"); } else { puts("InCorrect"); } } else puts("InCorrect");}int main(){ FILE *fp; fp = fopen("C:\\Users\\Elvin\\Documents\\Password_OIB_ETALON.txt" , "r"); char A[N]; char O4gh[80]; int i = 0; int j = 0; int dlina=0; int JBLhU9=0; fscanf(fp, "%s", &A) != EOF; puts(A); puts("\nEnter the O4ghword\n"); gets(O4gh); dlina=strlen(A); JBLhU9=strlen(O4gh);for(i=0;i<dlina;i++) { A[i]=A[i]^5; }puts(A);for(i=0;i<JBLhU9;i++){ O4gh[i]=O4gh[i]^5;}puts(O4gh); vpqumlntyof(A,O4gh); _getch(); return 8;} I would like to remove the spaces, but they do not move for some reason. And is it possible to insert a garbage code here, as when obfuscating?
char sep [10]=" \t\n";? - Vladimirconst volatile i. Or end the line after the comment or#include... - Harry