#include<stdio.h>
void xgets(char *str)
{
scanf("%[^\n]s", str);
}
void xputs(char *str)
{
printf("%s\n", str);
}
/*By putting [^\n] inbetween % and s in scanf() function
will cause the function to accept even string after enter
has hit*/
Ad
Chapter - 12: Console Input-Output
Write down two functions xgets( ) and xputs( ) which work similar to the standard library functions gets( ) and puts( ).
Ad
Ad