My teacher has assigned us a problem in which we have to write a program that prints itself. The program must use file pointer. Below is what I have done so far:

#include <stdio.h>
main ()
{
FILE *fp;
fp = fopen("filename.c", "r");
fclose (fp);
}

Can you tell what I am missing? When I execute I get a funny symbol. Any help is appreciated.