ras le bol

This commit is contained in:
2026-02-23 01:15:30 +01:00
parent fba51abae3
commit 28dee070b3
38 changed files with 442 additions and 321 deletions
@@ -0,0 +1,49 @@
#include <stdio.h>
int hidden_message(const char *filename, const char delim){
FILE *file = fopen(filename, "r");
if(!file) return 1;
int c = fgetc(file);
printf("%c", c);
//char *cara = c;
while(c != EOF){
c = fgetc(file);
if( c == delim){
c = fgetc(file);
printf("%c", c);
}
}
fclose(file);
return 0;
}
/*
int main()
{
hidden_message("example.txt", ':'); // Must return 0.
// Must print nook
putchar('\n');
hidden_message("example.txt", ';'); // Must return 0.
// Must print: n
// Because no delimiter was found, so only the first character is printed
putchar('\n');
hidden_message("does_not_exist.txt", ':'); // Must return 1.
// Must not print anything
// FLAG
//Decode the given message to understand what it means
//
hidden_message("flag.txt", '~');
return 0;
}
*/