this code removes comments
please help in correcting the code
//Program to print a file by removing Comments
#include<stdio.h>
void main()
{
FILE *fp;
char ch;
//clrscr();
fp=fopen("temp.txt","r");
while(1)
{
ch=fgetc(fp);
if(ch==EOF)
break;
else
{
if(ch=='/'){
ch=fgetc(fp);
if(ch=='/')
{
while(1)
{
ch=fgetc(fp);
if(ch=='\n')
goto label;
}
}
if(ch=='*')
{
while(1)
{
ch=fgetc(fp);
if(ch=='*')
{
ch=fgetc(fp);
if(ch=='/')
{
while(1)
{
ch=fgetc(fp);
goto label;
}
}
else printf("*");
}
}
}
else printf("/");
}
}
label:printf("%c",ch);
}
fclose(fp);
}