/* priklad pr6_1.c  vstup - vystup retazca */
#include <stdio.h>

void main(void)
{
  charf s2[30],s3[30],*s1=s3;
  int i=0;

  printf("Vstup retazca 1.po znakoch:");
  while ((s2[i] = getchar()) != '\n') i++;
  s2[i++] = '\n';
  s2[i] = '\0';
  for (i = 0 ; s2[i] != '\0' ; i++) putchar(s2[i]);
  printf("Vstup retazca 2.po znakoch:");
  while ((*s1++ = getchar()) != '\n');
  *s1++ = '\n';
  *s1 = '\0';
  for (i = 0 ; s3[i] != '\0' ; i++) putchar(s3[i]);

  printf("Vstup retazca 1.gets:");
  gets(s2);
  puts(s2);
  printf("Vstup retazca 2.gets:");
  s1 = s3;
  gets(s1);
  puts(s1);

  printf("Vstup retazca 1.scanf:");
  scanf("%s", s2);
  printf("Printf s2 = %s\n", s2);
  printf("Vstup retazca 2.scanf:");
  scanf("%s", s1);
  printf("Printf s1 = %s\n", s1);
}