I need some help...

example writing a C code how to open a simple txt file

That is just:-

FILE *fp;
 fp = fopen("my.txt" , "r");