1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

hi

Discussion in 'C' started by prem_may10, Oct 3, 2006.

  1. prem_may10

    prem_may10 New Member

    hi
    This is premchand. I want to a program which gives the output as source code of the program
     
  2. shabbir

    shabbir Administrator Staff Member

    Here it comes

    Code:
    void main()
    {
    	FILE *fp;
    	char ch;
    	fp = fopen(__FILE__,"r");
    	while((ch=fgetc(fp))!=EOF)
    	{
    		printf("%c",ch);
    	}
    	fclose(fp);
    }
    
     

Share This Page