From 8ec5431354bdb582455e8c32758098c5a0fdada2 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 26 Jul 2019 23:17:36 +0200 Subject: exam final --- .../subjects/10-0-count_alpha/subject.en.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 exam_final/subjects/10-0-count_alpha/subject.en.txt (limited to 'exam_final/subjects/10-0-count_alpha/subject.en.txt') diff --git a/exam_final/subjects/10-0-count_alpha/subject.en.txt b/exam_final/subjects/10-0-count_alpha/subject.en.txt new file mode 100644 index 0000000..a057f70 --- /dev/null +++ b/exam_final/subjects/10-0-count_alpha/subject.en.txt @@ -0,0 +1,25 @@ +Assignment name : count_alpha +Expected files : count_alpha.c +Allowed functions: write, printf +-------------------------------------------------------------------------------- + +Write a program called count_alpha that takes a string and displays the number +of occurences of its alphabetical characters. Other characters are not counted. +The order is the order of occurence in the string. The display must be ended by +a newline. + +The format is in the examples. + +If the number of arguments is not 1, display only a newline. + +Examples : +$> ./count_alpha abbcc +1a, 2b, 2c +$> ./count_alpha "abbcc" +1a, 2b, 2c +$> ./count_alpha "abbcc" "dddeef" | cat -e +$ +$> ./count_alpha "My Hyze 47y 7." | cat -e +1m, 3y, 1h, 1z, 1e$ +$> ./count_alpha "" | cat -e +$ -- cgit