Hi I was ask to do a code in c wich read the contenent inside a txt file and display it then after display it they wan't me to tokenize those command and interpretate them in c. I have no experience in c if someone can show me how to read a txt and make c do a command i apreciate it. sorry if my english is not good.
this is mi text file
virtual.txt
int x;
printline("<html><body>");
while(x=!10){
printline("<h1>this is a test<\h1>");
x++;
}
printline("</body></html>");
this is my code to display it's contenents
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *temp;
int c;
temp=fopen("virtual","r");
printf("this is the contents of the file :\n\n");
while((c=getc(temp))!= EOF)
printf("%c",c);
fclose(temp);
return 0;
}