#include <stdio.h>
int main()
{
char n, m;
puts (" Enter the first string and . to terminate :");
do
{
n = getchar();
putchar(n);
}while(n !='.');
puts (" Enter the second string and . to terminate :");
do
{
m = getchar();
putchar(m);
}while( m != '.');
return 0;
}
Output
------------
Enter the first string and . to terminate :
234.
234. Enter the second string and . to terminate :
2343.
2343.Press any key to continue
In the above program- output the i can't enter the value of the second
string in the same line.
Here control automatically moves to next line.
ie., The value cannot be entered in the same line even there is no
corresponding cout function.
thanks,