blob: e11a0b3855490ea4e9d6d036774388e03dc3d408 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Assignment name : aff_z
Expected files : aff_z.c
Allowed functions: write
--------------------------------------------------------------------------------
Write a program that takes a string, and displays the first 'z'
character it encounters in it, followed by a newline. If there are no
'z' characters in the string, the program writes 'z' followed
by a newline. If the number of parameters is not 1, the program displays
'z' followed by a newline.
Example:
$> ./aff_z "abc" | cat -e
z$
$> ./aff_z "RaInB0w d4Sh!" | cat -e
z$
$> ./aff_z "ThE C4k3 Is a L|3" | cat -e
z$
$> ./aff_z | cat -e
z$
|