heres the code
Code:
 
#include<dos.h>
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
void write2screen(int y,int x,char c,int attb);
main()
{
FILE *ptr; char a[12];
int i,j;
for(i=2;i<=49;i++)
{
	for(j=2;j<=79;j++)
	{
	write2screen(i,j,' ',0);
	}
}

ptr=fopen("C:\\new.txt","w");
fprintf(ptr,"hello");
getch();
textattr(18);
gotoxy(10,10);
cprintf("Hello");
gets(a);
getch();
puts(a);
getch();
}