#include <acknex.h>
#include <stdio.h>
function main()
{
FILE* file = NULL;
int character = 0;
file = fopen("text.txt","r");
if(file != NULL)
{
character = fgetc(file); // init the current character
while(!feof(file)) // continue until the end of the file
{
printf("%c",character); // display the character
character = fgetc(file); // read the next character
if(ferror(file))
printf("Error in file !");
}
file_close(file);
}
else
{
printf("can't open the file !");
}
}