Thursday, April 25, 2013

Create a text file and enter “to write a good program is very time consuming job.” Create another text which contains reverse of above text.

4:15 PM


#include<stdio.h>
#include<conio.h>
void main()
{
  FILE *fp,*f;
  char str[]= "To write a good program is very time consuming";
  int i;
  fp=fopen("old.txt","w");
  fputs(str,fp);
  f=fopen("new.txt","w");
  for(i=strlen(str);0<i;i--)
    fputc(str[i],f);
  fclose(fp);
  fclose(f);
}

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

1 comments:

 

© 2013 TechSansar. All rights resevered. Designed by Templateism

Back To Top