#include<stdio.h>
int main()
{
char c;
c=getchar();
while(c!='\0')
{
printf("%c",c);
c=getchar();
}
return 0;
}
We would like to terminate the program by entering NULL character from keyboard but it's not working.