/* Read a text until $ and copy to another array */
#include< stdio.h>
#include< conio.h>
void main()
{
	char a[100],b[100],*pa,*pb;
	pa=&a[0];   /* OR can be written as   pa=a */
	clrscr();
	printf("enter the text\n");
	for(;(*pa=getchar())!='$';pa++);
	*pa='\0';
	/* copy to another array part */
	for(pa=a,pb=b;*pa;pa++,pb++)
	*pb=*pa;
	/* after copying the text */
	*pb='\0';
	for(pb=b;*pb;pb++)	/* *pa means *pa!='\0'	*/
	putchar (*pb);
	getch();
}
/*
	input : enter the text
		nickolas$
	output:	nickolas
*/