24 lines
664 B
Plaintext
24 lines
664 B
Plaintext
Assignment name : inter
|
|
Expected files : inter.c
|
|
Allowed functions: write
|
|
--------------------------------------------------------------------------------
|
|
|
|
Write a program that takes two strings and displays, without doubles, the
|
|
characters that appear in both strings, in the order they appear in the first
|
|
one.
|
|
|
|
The display will be followed by a \n.
|
|
|
|
If the number of arguments is not 2, the program displays \n.
|
|
|
|
Examples:
|
|
|
|
$>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e
|
|
padinto$
|
|
$>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e
|
|
df6ewg4$
|
|
$>./inter "nothing" "This sentence hides nothing" | cat -e
|
|
nothing$
|
|
$>./inter | cat -e
|
|
$
|